If you are only talking about iOS 3.0, release any objects that can be easily recreated in viewDidUnload . Then you can recreate or reload them from the tip in viewDidLoad . Make sure that when releasing objects, you will either reset them to zero or ask your setter. That way, you can use viewDidLoad to check for zero or not before rebooting or re-creating.
As for loading from nib objects, if you load your properties and you have the option to save them, then you no longer need to save them.
From Apple :
The UIViewController class provides some automatic processing of low-memory conditions using the didReceiveMemoryWarning method (page 20), which frees up unnecessary memory.
Prior to iPhone OS 3.0, this method was the only way to free up additional memory associated with your custom controller class, but on iPhone OS 3.0 and later versions, the viewDidUnload method (page 30) may be a more suitable place for most needs. When a warning occurs with a low In memory, 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 opportunity 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 (page 29), and objects Created lazily at runtime and added to the view hierarchy. Generally, if your view controller contains output (properties or raw variables that contain the IBOutlet keyword), you should use the viewDidUnload method to discard ownership of these points or any other view-related data that you no longer need.
source share