(Just so you know I am learning to develop for iphone, without interfacae builder)
I'm coding my first multi-view app, which has a root viewcontroller and two other viewcontrollers, and the root viewcontroller uses lazy loading, so when viewDidLoad, it creates the first viewcontroller and adds its view to the subview, but doesn't create the other one until it is needed. But, after the second one has loaded, they both stay there until the application ends (unless it receives a memory warning).
So I'm wondering: when the user switches two the other view, should I unload the other one that's being removed (by setting it to nil -- its a retaining property) ? So everytime the user clicks the button, the current viewcontroller is unloaded (after being removed from the superview) and the next one is loaded and added as a subview?
So is this the right thing to do, or is it right, but only when the application has many views and mine isn't complicated enough to justify doing this, or is it bad to do it at all and I should just let didReceiveMemoryWarning take care of it (In didReceiveMemoryWarning I set the viewcontroller that isn't currently being displayed to nil) ?
Thanks!!