开发者

Can I adjust the memory warning level for iphone/ipad app?

iOs will give 开发者_运维技巧memory warning (level 1, 2, ...) for the apps.

Can I change the level criterial?

I mean for e.g., level 1 = 20 mb left, level 2 = 2 mb left.

I can tell iOs level 1 = 50 mb left?

thanks


Nope; you can't change that. Nor do you want to. There are other things on the system that also consume memory and it may vary over time. While the system components are highly optimized to not grow over time, they can do allocations and, thus, when you receive that notification there may already be less available than the notification indicates.

The values are set such that there is enough of a comfort zone that your app is unlikely to be jettisoned by the time you receive the notification and deal with it.

A far better solution is to fix your app's design and/or implementation to not use so much memory.


No. The warning isn't meant to be "uh oh, you're choking the device, LOL" but rather something your application is given a chance to respond to before it is killed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜