开发者

iPhone SDK: Is viewDidUnload called on dealloced viewcontroller?

开发者 https://www.devze.com 2023-01-08 14:45 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消