Apple says, that in Cocoa -dealloc will not be called neccessarily when the application quits. Does this also apply to the iPhone?
Yes, it does. If the application is quitting, under certain circumstances, dealloc will not be called. If, for example, anything in applicationWillTerminate takes too long or throws an uncaught exception, the application will quit without calling dealloc.
It may be that it never calls dealloc on quit, since the OS does the memory cleanup anyway. The simplest and quickest solution to find out would be to put a breakpoint on the dealloc of your main view controller and see if it's called on application quit.
I think I remember it wasn't called when I tried this once, but I'm not sure, which is why you should try it yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With