An additional note is that viewDidUnload may be not executed before dealloc. This happens when the UIViewController reference count reach 0.
As the Xcode template says:
- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}