开发者

XCode Instruments Allocations: Look at Live Bytes or Overall Bytes?

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?

Someone said the iOS can close my app if I use for 22MB, is that from the Live or Overa开发者_运维百科ll bytes section?

XCode Instruments Allocations: Look at Live Bytes or Overall Bytes?


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜