简体   繁体   中英

iPhone SDK: Is viewDidUnload called on dealloced viewcontroller?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM