La plume légère, vers Tue, Mar 21, 2006 at 05:04:09PM -0500, heure d'inspiration, Lief Sinolumat écrivait en ces mots: > Chris, thanks for the help. > > It is indeed WhiteColor causing the the crash. WhiteColor is a static > variable set when the view is initialized: > > WhiteColor = [NSColor whiteColor];
As a convention in the GNUstep/Cocoa API, any constructor method other than "alloc" or "new" will retained an autoreleased object. This makes it possible to not always have to release (free) object which most of the time are temporary and only useful in the scope where they're created. In your code, you invoke [NSColor whiteColor] in +initialize that way. So what you should do in invoke "retain" on "WhiteColor" to fix this problem. W. -- "An eye for an eye only makes the world blind." (Gandhi) _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
