开发者

How to improve memory footprint for iPad apps

开发者 https://www.devze.com 2023-02-03 23:14 出处:网络
I have an iPad app that is doing really well, zero crashed reported by Apple after 5 months and 3 releases.

I have an iPad app that is doing really well, zero crashed reported by Apple after 5 months and 3 releases.

However occasionally the OS kills the app, my guess is for shortage of free memory开发者_如何转开发. I am not doing anything right now in the warninglowmem event.

I would like to receive some solid recommendation of what I should do to improve the memory footprint. What tools and tricks I can start using to understand where I am right now and how further I can go with the improvements.


I'd suggest starting by reading about Instruments which will let you see what memory you're using and how much. In particular, the "Quick Start" and "Analysis Techniques" sections in that document should get you pointed in the right direction.

Using the "Allocations" instrument will help you watch your memory grow and tells you where it's being allocated.

You might also try using the "Leaks" instrument, which will point out if you're leaking memory (rather than just allocating too much).


There is an awesome instrumentation tool included with Xcode that lets you look for leaks. From the Run menu choose Run With Performance Tool -> Leaks and you can see where you might be leaking memory over time. That's a great place to start. Next you can look at the "Allocations" tool to see how you're utilizing memory over time. Start there and you'll learn a ton.

0

精彩评论

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