• 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: Leaking CGColor objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leaking CGColor objects


  • Subject: Re: Leaking CGColor objects
  • From: Charles Steinman <email@hidden>
  • Date: Sun, 26 Oct 2008 12:44:13 -0700 (PDT)

--- On Sun, 10/26/08, DKJ <email@hidden> wrote:

> On 26 Oct, 2008, at 12:09, Clark S. Cox III wrote:
> > You must do both, otherwise you will leak.
>
>
> I understand why I have to release the temp object, but why
> does it
> leak if I don't set foregroundColor to nil as well?

Because otherwise there won't be a release to balance the retain in the in setForgroundColor:. See the docs on Objective-C memory management:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

Cheers,
Chuck



_______________________________________________

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

  • Follow-Ups:
    • Re: Leaking CGColor objects
      • From: DKJ <email@hidden>
References: 
 >Re: Leaking CGColor objects (From: DKJ <email@hidden>)

  • Prev by Date: Re: Leaking CGColor objects
  • Next by Date: Re: Newbie: Referencing Objects
  • Previous by thread: Re: Leaking CGColor objects
  • Next by thread: Re: Leaking CGColor objects
  • Index(es):
    • Date
    • Thread