didReceiveMemoryWarning, level 2 with only ~3MB of usage
My iPad application has a number of navigation controllers that are chosen dependant on selection of a list (a bit like how a tab bar controller works - or see the apple Remote application and choose Radio, and you should get the idea).
I have limited the 开发者_运维百科max depth of each of these navigation controllers to 50. I also clean up unnecessary RAM usage of non displayed view controllers periodically, or when i receive a didReceiveMemoryWarning.
Using instruments the memory usage does not get above 3.5MB.
If I push on above around 75 controllers in total onto the navigation controllers, i get a Level 2 warning and my application is terminated.
Why is this? What can i do about it?
Your app will never get termed if you are only using 3.5MB. But unfortunately, it's not as easy as it should be to see how much memory your app is really using.
Try the method that I discussed on this question and see if you get a more realistic idea of how much memory you are using. That would be the first step to see how to avoid using so much.
Good luck! Here's the other question: iOS Low Memory Crash, but very low memory usage
精彩评论