I decided to use storyboards in a project I have been doing. When the app launches it does the right thing of awakeFromNib and then viewDidLoad, but when the app has finished segueing to another view, it doesn’t call viewDidUnload and, I think, neither does dealloc. I have used Apple’s Instruments and doesn’t show any memory leaking.
Just to note, I am using custom segues and testing this by inserting NSLogs into the methods. Has anyone else come across this?
Just want to update: dealloc actually is called but not viewDidUnload.
The
viewDidUnloadmethod is solely for the purposes ofdidReceiveMemoryWarning(i.e. when the view is being removed to recover some memory, but the view controller is not). If you want to seeviewDidUnloadwhile running in the Simulator, push or presentViewController to a secondary view, then generate a memory warning from the Simulator’s menus. I quote from the UIViewController Class Reference: