• 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: Crash while getting the NSColor components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash while getting the NSColor components


  • Subject: Re: Crash while getting the NSColor components
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 21 Jun 2006 11:14:18 -0700

On Jun 20, 2006, at 11:32 PM, Vinay Prabhu wrote:

My observation here is if the values of the var's
red and redEdit are different, it doesn't crash.
If the values of the red and redEdit is same it will crash.

If the crash is because of missing retain, it should crash in both the
cases...

Your code clearly is missing a retain; you must retain the color.

Am I right?

No, you aren't. Some colors are retained by the system (ie: [NSColor redColor] etc). Other colors that are created are not. You must always properly retain/release the colors you store as ivars.


-corbin

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: Crash while getting the NSColor components (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: Re: Unique data in Core Data?
  • Next by Date: Re: Crash while getting the NSColor components
  • Previous by thread: RE: Crash while getting the NSColor components
  • Next by thread: Re: Crash while getting the NSColor components
  • Index(es):
    • Date
    • Thread