Skip navigation.
 
mlRe: Crash while getting the NSColor components
FROM : Corbin Dunn
DATE : Wed Jun 21 20:14:18 2006

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

Related mailsAuthorDate
mlCrash while getting the NSColor components Vinay Prabhu Jun 20, 10:39
mlRe: Crash while getting the NSColor components Corbin Dunn Jun 21, 00:34
mlRE: Crash while getting the NSColor components Vinay Prabhu Jun 21, 07:41
mlRe: Crash while getting the NSColor components Chris Suter Jun 21, 07:50
mlRE: Crash while getting the NSColor components Vinay Prabhu Jun 21, 08:32
mlRe: Crash while getting the NSColor components Corbin Dunn Jun 21, 20:14
mlRe: Crash while getting the NSColor components Uli Kusterer Jun 21, 20:35