Reputation: 7501
I have read many answers regarding this still i am getting confused if i want to check using simulator Is there Any way to identify which methods called at which time? some one is saying dealloc () method is calling when you view controller is getting changed and when you come back then viewdidunload is getting called.I want to know exactly when this both methods is getting called?
Upvotes: 0
Views: 342
Reputation: 2859
The dealloc method gets called when the controller is being removed from memory. This method is called when the controller is about to be removed from existence (you should release everything and perform general cleanup).
The viewDidUnload method is called when the view is being destroyed. After this method is called the controller may continue to exist. In this method you should release anything that supports the view and that is no longer needed.
If you would like to see exactly when they are called you can put in NSLog() statements and monitor the log.
Upvotes: 2