I’m having an issue in iOS 5.0 only, where low-memory warnings received while a modal view is present can sometimes leave me with a white screen – I believe this happens because my tab bar controller releases all of its views.
The same scenarios don’t cause a problem in iOS 4.0. There are two explanations I can think of:
- iOS 5 uses more RAM, leaving less for the app
- iOS 5 treats low-memory situations differently
In versions before 5.0, I used to be able to respond to a low-memory warning by freeing up some additional memory. In 5.0, it seems like the first time I get a low-memory warning, everything under my modal view controller clears its view. Tracing confirms that, after a memory warning, any controllers under the modal view controller have their view field set to nil.
Can anyone point me to information (ideally from Apple) about how iOS 5 handles low-memory situations vs. earlier versions? I’d like to be able to free up some memory when necessary instead of having all my views cleared out.
In answer to the question in your last paragraph, you are looking for the iOS Performance in Depth video from WWDC 2011. It discusses low-memory handling in iOS 5 starting around 13 or 14 minutes in, and discusses changes to the low-memory warning message specifically starting around 16 minutes in.
I’m not sure it will help you figure out what’s going wrong with your app though.