I have a UIViewController that is pushed onto a container controller and then popped off, and using the allocations instrument, I can see that the view controller is destroyed afterwards. However, a breakpoint in the controller's dealloc is never reached. Does anyone know why dealloc isn't called? Is it possible for ARC to destroy an object without calling dealloc?
Also, I've disabled NSZombies (some have said that can cause dealloc not to fire).
Edit:
Dealloc doesn't do much, just prints to the console, and it never gets called:
- (void)dealloc
{
NSLog(@"Deallocating...");
}
I can't post the container controller–it's proprietary and too complicated. Dealloc is called consistently on some controllers and not others. If I can find the time I will try and post a simplified version that reproduces the problem.
Is there any way to verify that NSZombies is disabled?
Edit2
I'm posting a screenshot from instruments; it looks to me like it's properly deallocating.
question from:
https://stackoverflow.com/questions/9219030/dealloc-not-being-called-on-arc-app 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…