The New iPad: Low Memory Warnings Not Appearing?

前端 未结 6 1470
星月不相逢
星月不相逢 2020-12-13 20:11

I have been developing an application for iPad that is very graphically intensive. I have been able to squeeze quite a bit of performance out already on the iPad 2, but the

6条回答
  •  [愿得一人]
    2020-12-13 20:36

    I contacted the Apple Support to solve my memory problem and asked about the low-memory warnings on iPad 3:

    -Because memory warnings are delivered on the main thread, your app will not receive memory warnings if it's blocking the main thread.

    -Even if your app is not blocking the main thread, it is possible for memory usage to grow quickly enough that memory warnings are not delivered before your app is killed to free memory.

    -Memory warnings trigger when the kernel transitions between various levels of memory pressure. Because of this, it is common for an app to receive a memory warning and then be killed quite some time later when memory is exhausted. The initial memory warning freed enough memory to keep the app alive, but not enough for the kernel to transition to a lower level of memory pressure.

    Because of all this, memory warning should be treated as a useful data on the state of the hardware and a good guide on how much memory your app should use on a given device, but should not be relied on as a tool to prevent your app from being killed.

    Maybe this helps...

提交回复
热议问题