XCode Instruments分配:查看实时字节还是总字节? [英] XCode Instruments Allocations: Look at Live Bytes or Overall Bytes?

查看:117
本文介绍了XCode Instruments分配:查看实时字节还是总字节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的iOS应用程序中收到一些内存警告,因此我正在运行Instruments以查看分配.我应该看看*所有分配*活动字节还是总字节?

I am getting some memory warning in my iOS app so I am running Instruments to see the allocations. Should I look at the * All Allocations * Live Bytes or Overall Bytes?

有人说,如果我使用22MB,iOS可以关闭我的应用程序,是从实时字节"部分还是总字节数"部分?

Someone said the iOS can close my app if I use for 22MB, is that from the Live or Overall bytes section?

推荐答案

活动字节是当前使用情况,也是您感兴趣的部分,总字节包括所有已释放的分配.另一件事是查看图表并查找峰值.例如,我知道自己能够将峰值内存使用量减少到8MB,因此我正在开发的应用程序看到一个大约27MB的巨大峰值.

Live Bytes is the current usage and is what you are interested in, overall bytes includes all released allocation. The other thing is to look at the graph and look for peaks. As an example I saw a huge peak of about 27MB in an app I was working on, knowing that I was able to reduce peak memory usage to 8MB.

随着时间的流逝,您在锻炼应用程序时也可能会随着时间的推移而出现大量内存增长,而这不会泄漏,只是不再使用.

Also watch over time as you exercise your app, it is possible to have substantial memory growth over time that is not leaked, just not not used anymore.

有关内存列的说明,请参见说明实时字节数和总字节数.

For a description of the memory columns see Explanation of Live Bytes & Overall Bytes.

这篇关于XCode Instruments分配:查看实时字节还是总字节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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