Skip to content

Memory not deallocated after logging out #21010

@staskus

Description

@staskus

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

  1. Open the fresh app
  2. Observe the Memory Graph, only login-related classes are allocated
  3. Login
  4. Logout
  5. Observe the Memory Graph: Tab Bar, Dashboard, and many other classes are still allocated
  6. Login again
  7. Observe the Memory Graph: notice even more allocations. For example multiple instances of BlogDashboardViewController. Observe memory increasing
Memory Leak 1 3 - Memory skyrocketing Memory Leak 1 2 - Blog Dashboard VC keeps increasing
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS 22.6

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions