开发者

settings things to nil in viewDidUnload()

What is the purpose of setting things to nil in the viewDidUnload() method? I know it has something to do with releasing memory, but I thought开发者_如何转开发 that's what release was for in the dealloca() method. How do you know which things to put in viewDidUnload() to set to nil?


The purpose is to free up memory that no longer needs to be used (because the view isn't in use) and the things you put there are things that can be re-created on viewDidLoad (generally speaking).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜