Search code examples
iphoneipaddealloc

iPhone. Shouldn't hitting the home button cause UIApplicationDelegate's dealloc to be called


I have put NSLogs in all my classes including my UIApplicationDelegate subclass. I am curious - and a bit nervous - about why I am not seeing them echo anything when I press the home button. I am running in the XCode simulator.

Since iPhone/iPad runs a single app at a time, doesn't hitting the home button discard all traces of the running app?

Thanks,
Doug


Solution

  • When an app is terminated, its memory is simply freed. Dealloc is not called, it does not pass go or collect $200. This is normal and intended.