Memory Leak Help

Discussion in 'iPhone/iPad Programming' started by ahan.tm, Feb 13, 2012.

  1. ahan.tm, Feb 13, 2012
    Last edited: Feb 13, 2012

    macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #1
    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
     
  2. macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    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.
     
  3. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    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.
     
  4. macrumors 6502

    Joined:
    Jan 21, 2008
    Location:
    Texas
    #4
    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.
     
  5. thread starter macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #5
    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!!:)
     
  6. macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #6
    You may be interested in 'Diagnosing Memory Problems' at new site NSScreencast.com
     

Share This Page