Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ahan.tm

macrumors regular
Original poster
Jun 26, 2011
141
0
Florida
Hi,

I am at the final stage of my non-ARC iPhone app and I am having trouble with memory leaks. Instruments only points out 3 memory leaks when I run the app on my device. However, when I run and Analyze in Xcode, I get like 50 potential leaks. Which one should I trust? Are there any alternate(non-apple) methods for detecting leaks?

Thanks
 
Last edited:
You look at each instance and decide if the analyzer is telling the truth. It's pretty good at identifying leaks. I've seen a few cases, like blocks, can confuse the the situation.
 
I think you should check all of them.. Leaks can cause an application to crash hard and be rejected by Apple in the end. And it's just not fun when you're using the application that it will crash eventually.
Check each instance, what are you retaining, when not, when should you release, autorelease, set to nil and so on.
 
Look at all the ones that show up in Analyze but only fix them if they make sense. I've found the Leaks instrument to be more accurate.
 
Hi,

Thanks For Your Responses!!

I am having some trouble: When using my device, stack traces only have system libraries, none of my methods. When I double click on a leak, there is no code. It gives the error:"No Source". This does not appear when I use the simulator. Also, How can I hide system libraries? The box is grayed out.

Just in Case This Helps: I am using Bugsense and "strip debug symbols during copy is set to NO"

Thanks!!:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.