Re: This code is leaking...
Re: This code is leaking...
- Subject: Re: This code is leaking...
- From: Jens Alfke <email@hidden>
- Date: Sun, 19 Jun 2011 14:28:56 -0700
On Jun 19, 2011, at 7:29 AM, Tony Cate wrote:
> bitmapImageRep is leaking.
Actually it looks like thisImage is what’s leaking (and the imageReps leak too because they’re retained by it.) You initialize thisImage from a +new call (which is shorthand for alloc+init), but you don’t autorelease it before returning it.
> Why is the retain count 2 after the initWithData:? Should I file a bug?
Probably because during its initialization process something retained it and then autoreleased it. That shouldn’t matter to you, it’s an implementation detail. If you want to figure out where leaks come from, use the ‘leaks’ tool or Instruments.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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