开发者

Memory problems under 4.2?

开发者 https://www.devze.com 2023-01-28 20:42 出处:网络
A minor update to my app was rejected a few weeks ago because it crashed subsequent to a didReceiveMemoryWarning under iOS 4开发者_如何学运维.2.The app had never had serious memory problems under prev

A minor update to my app was rejected a few weeks ago because it crashed subsequent to a didReceiveMemoryWarning under iOS 4开发者_如何学运维.2. The app had never had serious memory problems under previous versions of iOS. Now, even with 4.2.1, I get a level 2 memory warning at app startup, before I've done anything. Using Instruments I don't see any major leaks, and my live bytes are at about 1 MB (1.5 MB if you really take the app's features for a spin).

Any thoughts what could be causing this? The app is image-heavy, but, as I said, I never had major problems or saw an update rejected prior to this. Any diagnostic techniques would be appreciated.

Thanks.


I've seen nothing to suggest that 4.2 is any different to earlier iOS releases in terms of memory management. Different versions of the OS are obviously going to leave variable amount of memory available; it seems that this update crossed a threshold for you.

If you're not leaking then you're just using too much memory and you need to figure out how to optimise. Maybe only loading images when they're needed, putting them in a more optimised format or breaking them into smaller pieces so you can cache them with a finer level of granularity. There's no silver bullet unfortunately.

0

精彩评论

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

关注公众号