views:

191

answers:

1

See the screenshot below, this is the only leak the Leaks Instrument finds in my app. Seems odd that main is leaking since it's out-of-the-box. Is this common?

main.m

top of call stack

bottom of call stack

+1  A: 

This usually indicates that the leak is occurring somewhere before the app delegate loads. Check any added resources like compiled libraries.

Drag this code source or your app delegate source into Instruments and it might show you the call stack so you can track it down.

Edit01:

See http://stackoverflow.com/questions/1634067/iphone-analyzing-leaks-with-instruments for an example of how to view source in Instruments.

TechZen
Tried this to no avail, not sure I did it correctly as Instruments seemed to ignore the fact that I dropped the code into it.
Griffo
Griffo: Your screenshot shows that you were already viewing the source in Instruments. What you should do is view the call stack for the leak, using the button at the bottom. Chances are, it actually got allocated somewhere deeper.
Peter Hosey
You have to switch Instruments to the source view. It's the IIRC the rightmost button on the bottom below where the code will appear.
TechZen
@Peter Hosey Sorry, I didn't explain myself clearly. See image of call stack above
Griffo