简体   繁体   中英

Memory size was keep on increasing while running application in Xcode 5 with iOS 7

I am implementing an iPhone application and when I ran this app initially it was showing memory size was 5.3MB

在此输入图像描述

and after 10 min it was showing memory size was 185.3 MB.

在此输入图像描述

I'm releasing objects manually and also analyzed my app, I have only one memory leak(that to return object in class method). What was the problem? is it harm to app while apple approve it?. Please help me. Thanks in advance.

No, you really shouldn't release it with this kind of a leak (or memory accretion). It will lead to crashes and that will cause data loss and upset users.

Heapshot analysis is designed to track down these kinds of problems. That is, use the Allocations Instrument to track memory growth over time iteratively and then eliminate the large memory consumers.

Apple will probably approve it as long as it is not crashing within the review time.

But no you should not release the app if you have a memory leak like this. Your app will have poor user experience and might crash if the users device memory runs full. You will get a low app store rating.

I would suggest you find out which object is taking up so much memory and fix it. If at all possible switch to ARC, this will take away some leaks.

I have same problem too. NSZombieEnabled flag work for me. I think this might be helpful to cope up with ARC. I have followed this link: How do I set up NSZombieEnabled in Xcode 4?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM