开发者

IPHONE: I have this line on my instruments... should I worry?

开发者 https://www.devze.com 2022-12-13 01:32 出处:网络
I 开发者_JAVA百科have this line (see picture) in my instruments while analyzing objects allocation.

I 开发者_JAVA百科have this line (see picture) in my instruments while analyzing objects allocation. The line says 1.17 Gbytes of overall bytes??? what does it means? Should I worry?

IPHONE: I have this line on my instruments... should I worry?


Yes and no, that is the cumulative memory of total allocations... but it does seem very high (I ran my biggest app and couldnt get it over 140MB). It would suggest that you are creating and destroying (or leaking) an excessive amount of objects/memory.

I would recommend two things:

1) click the (i) button next to ObjectAlloc (top left) and turn on "Only track active allocations", and under allocation lifespan below choose "Created & Still Living", then rerun your tests. This will allow you to track the current memory footprint of your app.

2) perform some optimisation of any loops with memory allocation (object creation), and run a thorough leak test using a tethered device (I believe there is issues with leak testing and the simulator).

0

精彩评论

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