NB: I saw a few questions being asked in this front, but none seem to have clarified my doubt.
Pre iOS6, all outlets, heavy resources like images and sounds were set to nil
in viewDidUnload
. Post iOS6, this is no more the case as views are not unloaded anymore. The system calls didReceiveMemoryWarning
and this is the new recommended place to put such resource neutralizations.
So what if the code needs to support everything above iOS4? On devices running iOS 4 and 5, viewDidUnload
will still be getting called. And in devices running iOS6, only didReceiveMemoryWarning
will be called.
Does this mean I have to replicate the code in both places? Is calling a common method in both places a good approach? Please provide your inputs or approaches on how this is being handled in the industry.