• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: This code is leaking...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >This code is leaking... (From: Tony Cate <email@hidden>)

  • Prev by Date: Re: CATransactions having no effect in CALayer draw delegate
  • Next by Date: Re: Automatically mirroring folders
  • Previous by thread: Re: This code is leaking...
  • Next by thread: How to Management Bytes?
  • Index(es):
    • Date
    • Thread