Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property `_statusBarTintColorLockingControllers` at `UIApplication` keeping ViewController in memory

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?

memory debugger

like image 676
Emannuel Carvalho Avatar asked Sep 19 '16 17:09

Emannuel Carvalho


2 Answers

_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.

like image 94
fabb Avatar answered Nov 05 '22 13:11

fabb


I was stuck with same problem when forgot to set some property to nil before dismiss my controller

like image 1
Ivan Besarab Avatar answered Nov 05 '22 14:11

Ivan Besarab