开发者

My iphone app gets memory warning and killed at 6.8MB

My app has a thread that does some time co开发者_Python百科nsuming job for more than a minute and the app consumes around 6.8MB of memory. I receive a memory warning after sometime and then it gets killed. There is nothing that I can release, and I am using not even 7MB of memory...driving me crazy...any advice please?


Maybe your memory is super-fragmented? Even 7mb full of leaked data shouldn't kill your app. You ought to have at least 20mb to play with. Try rebooting the phone and see if that helps.


I still do not know why it is happening, but now I have a found a workaround. Instead of running this job in a thread, if I run it on the main thread, neither I receive memory warning not it gets killed. But then I cannot show the progress in the UI. I am going to use NSTimer to do it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜