While doing some testing, I noticed that my Cocos2D
app was struggling pretty badly. This was weird because the app itself is not doing intense calculations, doesn't have items scheduled every update, and is generally simple.
Aside from the fact that I have not optimized images using TexturePacker
or the like, I could not think of any reason why this might be happening.
Upon further testing using the Memory profiler in Instruments
, I discovered that regardless of what state the device was currently in (running an app, sitting at the home screen, etc.), Maps was using 20-30MB of device memory. The App Store and Springboard were likewise using the same amount. I understand why the Springboard needs to stay running in memory, but why on earth are Maps and the App Store running in my app's sandbox?
I thought that once an app was exited, it was no longer in main memory. It has been my belief this whole time that any app can run in its sandbox, and that's about it - and that you were not required to double-tap the home screen and 'force quit' the app from the quick menu. However, force quitting Maps and the App Store was the only way to free up the necessary memory. Have my assumptions been wrong all this time? Is this just an Apple thing that I am forced to work around for memory intense applications?