Re: AppleEvent memory leak
Re: AppleEvent memory leak
- Subject: Re: AppleEvent memory leak
- From: Jens Alfke <email@hidden>
- Date: Wed, 27 Jan 2010 08:36:59 -0800
On 1/26/10 5:11 PM, Rainer Standke said:
> When I look at Leaks I am told that for each transaction (sending or
> receiving an AE) a little memory is leaked, about 400 bytes each. The
> leaks seem to happen fairly deep in the framework, not in my own code.
Interpreting leak backtraces can be tricky. Remember that what's being reported is just the creation of the object; the responsibility for the leak may lie elsewhere. It often happens that an object is created deep in framework code, then later returned to your code (or you get it out of a framework accessor), and you end up mis-refcounting it and cause a leak.
So when looking at the backtrace I often have to play detective and think
1. What kind (class, purpose) of object is being created?
2. Where in my code do I get that kind of object from the framework?
3. What do I then do with those objects? Where do I retain or release them?
4. Is there a possible imbalance between my retains/releases?
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden