Hi,
Here is a piece of code from the exploring the iPhone SDK book. It uses the example of 2 views. It checks to see which view is being used and will release the other one.
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; // Releases the view if it
// doesn't have a superview
// Release anything that's not essential, such as cached data
if (self.blueViewController.view.superview == nil)
self.blueViewController = nil;
else
self.yellowViewController = nil;
}
My question is: If my app has many views e.g 15, would I need to check each view as above and release what's not being used? Or is there a different technique used in that case?`