Reputation: 2304
I'm not using ARC and am a bit confused about what happens to all the objects I've retained when an app becomes suspended.
I had a look at this thread but it didn't help that much:
iPhone. Shouldn't hitting the home button cause UIApplicationDelegate's dealloc to be called
I've read the apple docs on multitasking but couldn't find any information specifically about dealloc.
I ran instruments, which didn't find any leaks but I'm unclear on what happens when the stop button is pressed
So my questions are:
1) Why aren't some of my dealloc methods being called? For example, the dealloc for my UIResponder is not being called (when I double tap the home button on my iPad and remove my app) and neither are the ones for any of my UIViewController objects.
2) When I hit the stop button on Instruments (while it's running checking for leaks), what mode is the app placed in? (for e.g inactive, background, suspended....something else?)
Since my mind is too accustomed to the C++ way of thinking where an application exit results in destructors being called, it's hard for me to visualise the iOS equivalent.
iOS deployment target: 8.0
Upvotes: 0
Views: 368
Reputation: 318824
kill -9
from the command line.None of this has anything to do with using ARC or not. None of it has to do with using Objective-C or C++ or Swift.
Upvotes: 3