FROM : Nick Zitzmann
DATE : Mon Apr 04 03:24:33 2005
On Apr 3, 2005, at 7:11 PM, Julien Palmas wrote:
> what about this to add a new color to the NSColor class ?
>
> + (NSColor *)lightRedColor {
> return [[NSColor colorWithCalibratedHue:0.0 saturation:0.1
> brightness:1.0 alpha:1.0] autorelease];
> }
>
> is that ok ?
No; that'll lead to a crash since it autoreleases an object that has
already been autoreleased.
Nick Zitzmann
<http://www.chronosnet.com/>
DATE : Mon Apr 04 03:24:33 2005
On Apr 3, 2005, at 7:11 PM, Julien Palmas wrote:
> what about this to add a new color to the NSColor class ?
>
> + (NSColor *)lightRedColor {
> return [[NSColor colorWithCalibratedHue:0.0 saturation:0.1
> brightness:1.0 alpha:1.0] autorelease];
> }
>
> is that ok ?
No; that'll lead to a crash since it autoreleases an object that has
already been autoreleased.
Nick Zitzmann
<http://www.chronosnet.com/>
| Related mails | Author | Date |
|---|---|---|
| Julien Palmas | Apr 4, 03:11 | |
| Nick Zitzmann | Apr 4, 03:24 | |
| Ondra Cada | Apr 4, 03:28 | |
| Ondra Cada | Apr 4, 03:35 | |
| Julien Palmas | Apr 4, 03:44 | |
| John C. Randolph | Apr 5, 00:39 |






Cocoa mail archive

