Search code examples
iphoneobjective-cmemory-managementuinavigationcontrollerretain

Retain count of navigationcontroller and window is 3


I am developing an iPhone application which is navigation based. Whenever the application quits, the retain count of the navigation controller and the window is 3. Can somebody explain me how to overcome this issue? The dealloc method, as a result, is not getting called.


Solution

  • There is no issue.

    • You should try not to concern your self with retain counts unless you see a definitive leak (usually in Instruments)
    • You don't need to worry about objects like your window (and, probably, your nav controller) being dealloc'd at application quit-time; ALL of your app's memory will go away at that time.