* 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:
Gregory John Casamento 2006-08-27 02:35:03 +00:00
parent aaa0f632ce
commit da7ae90539
5 changed files with 37 additions and 26 deletions

View file

@ -1,3 +1,14 @@
2006-08-26 22:30-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* 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.
2006-08-26 18:25-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSTableView.m: initWithCoder: minor cleanup.

View file

@ -90,7 +90,7 @@
NS_HANDLER
{
NSLog(@"Exception occured while loading model: %@",[localException reason]);
TEST_RELEASE(unarchiver);
// TEST_RELEASE(unarchiver);
}
NS_ENDHANDLER

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;

View file

@ -862,7 +862,7 @@ static Class actionCellClass;
if ([aDecoder allowsKeyedCoding])
{
NSCell *cell = [aDecoder decodeObjectForKey: @"NSCell"];
NSCell *cell = RETAIN([aDecoder decodeObjectForKey: @"NSCell"]);
if (cell != nil)
{

View file

@ -1186,22 +1186,22 @@ static BOOL flip_hack;
// FIXME
if (flags == 16)
{
return [NSFont controlContentFontOfSize: size];
return RETAIN([NSFont controlContentFontOfSize: size]);
}
else if (flags == 20)
{
return [NSFont labelFontOfSize: size];
return RETAIN([NSFont labelFontOfSize: size]);
}
else if (flags == 22)
{
return [NSFont titleBarFontOfSize: size];
return RETAIN([NSFont titleBarFontOfSize: size]);
}
}
self = [NSFont fontWithName: name size: size];
if (self == nil)
{
self = [NSFont systemFontOfSize: size];
self = RETAIN([NSFont systemFontOfSize: size]);
}
return self;