Dealloc on UIViewController

Everything is in the title. I would like to know when the dealloc method is called on UIViewController using ARC ?

In my app I have a navigation controller with multiple view controllers. When I dismiss my main navigation controller, the dealloc method is not getting call in any of my controllers ..

Thanks,

Answers


Dealloc is called on a UIViewController when the memory for that viewController is going to be deallocated from memory. If the dealloc method is not being called on your viewControllers when you expect it to be, you probably have a memory leak. It sounds like your view controllers may be retaining strong references to each other.

@property (nonatomic) UIViewController *otherController;

Change one side of the relationship to

@property (nonatomic, weak) UIViewController *otherController;


Need Your Help

vuejs with HTML5 audio property

javascript html5 audio vue.js

I'm using Vuejs to make a control panel for audio, I want to get the currentTime property bind to a computed value, so I write