Fix retain cycles in Login-related classes#21092
Merged
Conversation
…Controller Problem: - LoginNavigationController holds LoginEpilogueViewController and SignUpViewController - LoginEpilogueViewController and SignUpViewController captures LoginNavigationController strongly in the closure Solution: - Weak capture LoginNavigationController
wpmobilebot
reviewed
Jul 13, 2023
wpmobilebot
reviewed
Jul 13, 2023
Contributor
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr21092-d065812 | |
| Version | 22.8 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | d065812 | |
| App Center Build | WPiOS - One-Offs #6366 |
Contributor
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr21092-d065812 | |
| Version | 22.8 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | d065812 | |
| App Center Build | jetpack-installable-builds #5391 |
2 tasks
Contributor
Author
|
No further changes are necessary here besides integrating WordPress-Authenticator, updating release notes, and possibly adding a unit test to confirm the deallocation. |
Contributor
Author
|
I see some similar issues are also being fixed #21064 so there might be some duplications, either way it proves this is problematic |
guarani
approved these changes
Jul 14, 2023
Contributor
guarani
left a comment
There was a problem hiding this comment.
Changes look good, tested login and sign-up on JP and WP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #21075
Fix retain cycles in Login-related classes. The majority of changes are made in WordPress-Authenticator updates. We can merge those and then we can confirm that there're no more memory leaks after logging in in the JP-iOS app.
To test:
Memory deallocation
JetpackPrologueViewControllerwill still be allocated because it's assigned toWordPressAuthenticatorStyle, I didn't want to change authenticator architecture)Regression Notes
Breaking login flows
UI tests, manual testing
Added in the scope of WordPress-Authenticator changes
PR submission checklist:
RELEASE-NOTES.txtif necessary.