I have literally the same problem, as described here http://www.iphonedevsdk.com/forum/iphone-sdk-developmen开发者_如何学JAVAt/968-breakpoints-dealloc.html#post7406
Sorry for the quote, but the description is perfect.
Because my dealloc is also not called automatically, my question is, am I supposed to overwrite applicationWillFinish and call [self release] in order to not leave any leak?
Kind regards
you don't need to worry about 'cleaning up' memory when your app quits; the OS will nuke your address space from orbit (it's the only way to be sure). If you have non-memory-related cleanup to do (perhaps save temp info to a file), that should go in applicationWillTerminate:. No need to call [self release].
Maybe iPhone OS just doesn't bother with calling dealloc because your app is going to terminate anyway? Any cleanup code should go in applicationWillTerminate
, and you don't need to call [self release];
.
精彩评论