开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜