收到内存警告 [英] Received memory warning

查看:134
本文介绍了收到内存警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个具有xml解析器,uiwebview,navigationcontroller的应用程序,在主控制器上显示很多图像,这些图像在应用程序的整个生命周期中都保留在内存中.我使用核心数据存储数据.
由于收到以下警告,我试图找出应用程序的内存占用量:

I am working on an app with xml parser, uiwebview, navigationcontroller, displaying a lot of images on the main controller, that remains in the memory throughout the whole life of the app. I store my data using core data.
I tried to figure out the memory footprint of the application since I am getting the following warnings:

收到的内存警告.等级= 1
应用程序委托收到内存警告
主控制器收到内存警告
主控制器收到内存警告
RSSItem收到内存警告

Received memory warning. Level=1
app delegate received memory warning
main controller received memory warning
main controller received memory warning
RSSItem received memory warning

收到的内存警告.等级= 2
应用程序委托收到内存警告
主控制器收到内存警告
主控制器收到内存警告
RSSItem收到内存警告

Received memory warning. Level=2
app delegate received memory warning
main controller received memory warning
main controller received memory warning
RSSItem received memory warning

占用空间约为4MB,当我向下钻取并显示带有大量图像的UIWebViews时,其大小可能会增加到大约10MB. 这个足迹太大了吗?我认为有些应用程序要复杂得多.据我了解,这些应用程序有40-70MB的可用空间,可以使用,也可以随意使用,但绝对不能超过10MB.任何人都有任何见识我该怎么做才能解决它或解决问题.我没有泄漏. 恐怕真正的问题不是足迹,而是我不知道的其他事情. 感谢您的帮助.

The footprint is around 4MB, and jumps up to around to maybe 10 when I drill down and display UIWebViews with a significant number of images. Is that footprint too large? I assume that there are apps out that are considerably more complicated. From what I understand the apps have 40-70MB available, give or take, but definitely not 10MB limit. Anyone has any insight what can I do to fix it or work around the problem. I do not have leaks. I am afraid that the real problem is not the footprint but something else I am not aware of. Thanks for any help.

推荐答案

您在Instruments.app中拥有内存分析工具-这将向您显示与应用程序中的分配有关的大量数据.

you have memory analysis tools in Instruments.app - this will show you much data related to allocations in your app.

如果我不得不猜测:销毁不可见的图像.

if i had to guess: destroy images which are not visible.

这篇关于收到内存警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆