I'm doing some debugging and leak checking, so I've got some NSLog output in a few of my app's view controllers and such. Then I noticed one particular controller appears to be releasing quite a while after the others, even though the navigation controller is popping it off the view stack. Every other view is immediately unloaded and released. Perplexed.
views:
15answers:
1
A:
Just a guess, but often the navigation controller is referenced somewhere else. If it is, set those references to nil to allow the autorelease to happen.
NWCoder
2010-09-02 17:30:32
The navigation controller or the view controller?
E-Madd
2010-09-02 17:39:09
@NWCoder: There's no GC on iOS (currently). So setting pointers to nil by itself doesn't affect object retention or collection.
hotpaw2
2010-09-02 18:48:07