It all depends on your application, usually you do not need to do anything other than the recommendations recommended by Apple.
ViewControllers that are not currently displayed will receive a didReceiveMemoryWarning message. By default (calling [super didReceiveMemoryWarning] ), the view of the controller is unloaded (freed, freed). When the view is unloaded, the view controller receives viewDidUnload , where you must release all of your IBOutlets (or otherwise saved user interface elements). Only then can performance be completely free and memory free.
In didReceiveMemoryWarning you should also free up as much data as possible - if you save some part of the data model in the ViewController, release it and restore it to viewDidLoad , which will be called when your view is loaded again (when the user navigates to this controller). You can also tell your model classes about free memory.
Michal
source share