Reputation: 623
Using Xcode 8 new memory debugger I found out there was a ViewController in memory that shouldn't be there and the strong reference that was pointing to it was coming from this mysterious _statusBarTintColorLockingControllers
array in UIApplication. Does anybody know where it comes from? And more importantly, how to take my VC out of it?
Upvotes: 15
Views: 675
Reputation: 11735
_statusBarTintColorLockingControllers
seems not to be the real issue here. I had the same memory graph until I resolved a retain cycle where I forgot weak
on a delegate property.
Upvotes: 4
Reputation: 11
I had the same issue and it looks like this comes from overriding the preferredStatusBarStyle
variables. I removed this and no longer had the references retained.
Upvotes: 0
Reputation: 1008
I was stuck with same problem when forgot to set some property to nil before dismiss my controller
Upvotes: 1