UIViewController

One thing you should care of: -viewDidLoad and -awakeFormNib, as well as -loadView may be called more than once for the lifetime of the view controller. So, be carefully not to initialize ivars in such a way that you get a memory leak. The following code snippet would be the wrong way: - (void) viewDidLoad { [super viewDidLoad]; myArray = [[NSArray alloc] init...];   // possibly memory leak! }
 * http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html
 * http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/BasicViewControllers/BasicViewControllers.html#//apple_ref/doc/uid/TP40007457-CH101-SW19
 * http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg66146.html

The way to do proper initialization would leverage properties: - (void) viewDidLoad { [super viewDidLoad]; NSArray* tmp = [[NSArray alloc] init...];  self.myArray = tmp;  // property retains   [tmp release], tmp = nil; }