Ofcourse. YES, you must let go of your properties with saving, copying and not assigning. You set the Nil property to viewDidUnload.
- (void)viewDidUnload { [super viewDidUnload]; self.greetingView = nil; } - (void)dealloc { [greetingView release],greetingView = nil; [super dealloc]; }
Refer to memory management in the UIViewController help system: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
Memory is a critical resource in iOS, and view controllers provide built-in support to reduce memory at critical times. The UIViewController class provides some automatic handling of low memory conditions using the didReceiveMemoryWarning method, which frees up unnecessary memory. Prior to iOS 3.0, this method was the only way to free up additional memory associated with your custom controller class, but in iOS 3.0 and later, the viewDidUnload method may be a more suitable place for most needs.
When a low-memory warning occurs, the UIViewController class clears its views if it knows that it can reload or recreate them later. If this happens, it also calls the viewDidUnload method to give your code the option to give up ownership of any objects associated with your view hierarchy, including objects loaded by the nib file, objects created in your viewDidLoad method, and objects created lazily at runtime and Added to view hierarchy. Typically, if your view controller contains output (properties or raw variables that contain the IBOutlet keyword), you should use the viewDidUnload method to give up ownership of these points or any other view-related data that you no longer need.
source share