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).
精彩评论