* Source/GSNibLoader.m: loadModelData:... Remove TEST_RELEASE

from handler block.
	* Source/NSColor.m: initWithCoder: retain autoreleased instances
	of NSColor to prevent double release when the pool is cleared.
	* Source/NSControl.m: initWithCoder: retain cell to prevent
	double release when the pool is cleared.
	* Source/NSFont.m: initWithCoder: retain autoreleased instances
	of NSFont to prevent double release when the pool is cleared.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23340 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2006-08-27 02:35:03 +00:00
parent a25584e559
commit 38cd6de498
5 changed files with 37 additions and 26 deletions

View file

@ -1253,17 +1253,17 @@ systemColorWithName(NSString *name)
if (colorSpace == 1)
{
self = [NSColor colorWithCalibratedRed: red
green: green
blue: blue
alpha: alpha];
self = RETAIN([NSColor colorWithCalibratedRed: red
green: green
blue: blue
alpha: alpha]);
}
else
{
self = [NSColor colorWithDeviceRed: red
green: green
blue: blue
alpha: alpha];
self = RETAIN([NSColor colorWithDeviceRed: red
green: green
blue: blue
alpha: alpha]);
}
}
else if ((colorSpace == 3) || (colorSpace == 4))
@ -1289,13 +1289,13 @@ systemColorWithName(NSString *name)
if (colorSpace == 3)
{
self = [NSColor colorWithCalibratedWhite: white
alpha: alpha];
self = RETAIN([NSColor colorWithCalibratedWhite: white
alpha: alpha]);
}
else
{
self = [NSColor colorWithDeviceWhite: white
alpha: alpha];
self = RETAIN([NSColor colorWithDeviceWhite: white
alpha: alpha]);
}
}
else if (colorSpace == 5)
@ -1325,11 +1325,11 @@ systemColorWithName(NSString *name)
RELEASE(str);
}
self = [NSColor colorWithDeviceCyan: cyan
magenta: magenta
yellow: yellow
black: black
alpha: alpha];
self = RETAIN([NSColor colorWithDeviceCyan: cyan
magenta: magenta
yellow: yellow
black: black
alpha: alpha]);
}
else if (colorSpace == 6)
{
@ -1337,14 +1337,14 @@ systemColorWithName(NSString *name)
NSString *name = [aDecoder decodeObjectForKey: @"NSColorName"];
//NSColor *color = [aDecoder decodeObjectForKey: @"NSColor"];
self = [NSColor colorWithCatalogName: catalog
colorName: name];
self = RETAIN([NSColor colorWithCatalogName: catalog
colorName: name]);
}
else if (colorSpace == 10)
{
NSImage *image = [aDecoder decodeObjectForKey: @"NSImage"];
self = [NSColor colorWithPatternImage: image];
self = RETAIN([NSColor colorWithPatternImage: image]);
}
return self;