ipad - memory warning level 1 ,2 but still having more than enough memory
My iPad app always gives memory warning level 1 or 2, but NEVER crashes. It just display log for warning level 1 or 2, but I CAN continue operate on my app without any problem.
Also I have used activity instrument to monitor the memory usage of my app. It costs at most (peak)开发者_开发问答 40 MB in the life time.
Can someone tell me why? why it still gives warning when it only used up to 40 mb and never crashes?
Thanks
My iPad app always gives memory warning level 1 or 2, but NEVER crashes. It just display log for warning level 1 or 2, but I CAN continue operate on my app without any problem.
That's exactly how the system is supposed to work. The OS sends memory warnings to every process, and everybody frees some unneeded memory. The OS itself can also kill apps that are currently in the background. If enough memory can be freed, nothing needs to be killed. What good would the warnings be when your app would get killed every time anyway?
精彩评论