简体   繁体   English

当多个应用程序在后台运行时出现内存警告

[英]Memory warning when several apps running in background

I am programming an app for iPhone and sometimes i get a memory warning while testing the App on my iPhone 5s. 我正在为iPhone编写应用程序,有时在iPhone 5s上测试该应用程序时会收到内存警告。 After some testing on this I found out that I just get the warning if I have too much apps open in the background. 经过一些测试之后,我发现如果在后台打开太多应用程序,我只会收到警告。 If I close these Apps I don't get more warnings. 如果我关闭这些应用程序,则不会收到更多警告。

My app uses something around 16 MB memory and I have to open a number of apps t get the warning but all apps I use during the day are enough to get the memory warning. 我的应用程序使用了大约16 MB的内存,我必须打开一些应用程序才能得到警告,但是我白天使用的所有应用程序都足以收到内存警告。

So what I want to know is whether I have to take care about it or can I simply 'ignore' it? 所以我想知道的是我是否必须照顾它,还是可以简单地“忽略”它?

If your app has never crashed because of a low memory warning, you probably don't need to worry about it. 如果您的应用从未因内存不足警告而崩溃,那么您可能无需担心。 Although the device is running out of memory, it would first kill the background applications and when there are no more apps to kill, it will crash your application. 尽管设备的内存不足,但它将首先杀死后台应用程序,并且在没有其他要杀死的应用程序时,它将使您的应用程序崩溃。 So if your application hasn't crashed as of yet, you are ok for now. 因此,如果您的应用程序到目前为止尚未崩溃,那么您现在还可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM