Is the viewDidUnload method called even if the view controller is dealloced? It seems natural that it´s not called, but I cannot find an answer.
In that case objects released in the viewDidUnload: also need to be released in dealloc, right?
Is the viewDidUnload method called even if the view controller is dealloced? It seems natural that it´s not called, but I cannot find an answer.
In that case objects released in the viewDidUnload: also need to be released in dealloc, right?
no, it's not called, and yes, they should be released in the view controller's dealloc method; However, there's one stipulation: Everything you release in the viewDidUnload
method should be set to nil
so that if the view is unloaded and later released without being re-loaded you don't over-release anything.