-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory not deallocated after logging out #21010
Comments
Focusing on the Jetpack app case, the result is as this: Expected behaviorA strong reference to In this case, it's a problem that
however, in the case of
Somewhere in this cycle, we need to have a |
Additional informationAfter breaking strong references to a The most usual cases are: Assigning a function to a closureIn this case
Capturing self strongly in a closure
Passing a view controller to a closure that already holds a reference to this object
This is a tricky example. It's not obvious that a circular dependency cycle could be created here. However, since Holding onto the ViewController strongly in a view that is presented by the given ViewController
|
Parent issue: #20989
There're memory leaks happening that are preventing
ViewControllers
,Views
,Services
, and other entities from being released after logging out. Moreover, the allocations and memory usage keep on increasing with each login-logout iteration. The potential causes can be multiple.Login-logout sequence is just one of the angles to observe memory issues. However, I found it easier to reproduce and scope down.
Note, there's a possibility some of the issues could be resolved with Some notification observers are not removed but by looking at the memory graph I suspect there're many more issues to fix.
Expected behavior
Unused classes should be deallocated after logging out
Actual behavior
Classes are not deallocated after logging out, memory leaking, memory footprint keeps increasing with every login-logout sequence
Steps to reproduce the behavior
BlogDashboardViewController
. Observe memory increasingTested on [device], iOS [version], Jetpack iOS / WordPress iOS 22.6
The text was updated successfully, but these errors were encountered: