Re: Crash while getting the NSColor components
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