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

mikezang

macrumors 6502a
Original poster
May 22, 2010
930
38
Tokyo, Japan
I run my app with Instrument and I got some info about leaked memory, but it doesn't tell me which code made the leaked, how can I know where is the leaked in?
 

Attachments

  • SnapShot 2010-08-22 at 20.52.36.jpg
    SnapShot 2010-08-22 at 20.52.36.jpg
    186.9 KB · Views: 111
Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16)

Try Build and Analyze.
 
It is said there is a toolbar at the bottom of screen as below, but I can't find that toolbar, how can I show that toolbar?
 

Attachments

  • o0500027210324097029.jpg
    o0500027210324097029.jpg
    50.9 KB · Views: 101
So I thought instruments only shows you where the memory is allocated. This means that It wont show you that you didnt de-allocate, just that you allocated it. Idk, I pretty much ignore most of what instruments tells me unless I have crashes.

Build>Analyze finds most of the stuff that would get me into trouble.

Just be sure most of your @synthesize stuff gets released too cause build > analyze doesn't always pick those up.

EDIT: also that toolbar is there in the picture you posted in your firstpost, just at the top of the list instead of the bottom.
 
So I thought instruments only shows you where the memory is allocated. This means that It wont show you that you didnt de-allocate, just that you allocated it. Idk, I pretty much ignore most of what instruments tells me unless I have crashes.

Build>Analyze finds most of the stuff that would get me into trouble.

Just be sure most of your @synthesize stuff gets released too cause build > analyze doesn't always pick those up.
But why only three allocations are displayed? I think there are a lot of allocation in my app.

EDIT: also that toolbar is there in the picture you posted in your firstpost, just at the top of the list instead of the bottom.
You mean old version show toolbar at bottom and I am using new version that toolbar is at top?
 
But why only three allocations are displayed? I think there are a lot of allocation in my app.

I think it's because these allocations deal with elements created via a .xib file. I havent figured it out myself, but I get about 100+ "leaks" via instruments, yet my app doesn't crash or have memory errors. None of the leaks are even traceable back to code that I've written myself. This leads me to believe that the allocations occurred when the xibs are use internally.

I really dont know if that's true, but it hasn't stopped apple from approving my app and update.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.