Changed the retain/release policy in NSButton, NSCell, NSControl,

NSSlider and NSTextField classes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2230 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
netcrep 1997-03-05 19:46:41 +00:00
parent 1c8d394839
commit 10ada90f30
11 changed files with 112 additions and 13 deletions

View file

@ -83,7 +83,7 @@ NSString *NSControlTextDidChangeNotification = @"NSControlTextDidChangeNotificat
[super initWithFrame:frameRect];
// create our cell
[self setCell:[[MB_NSCONTROL_CELL_CLASS alloc] init]];
[self setCell:[[MB_NSCONTROL_CELL_CLASS new] autorelease]];
tag = 0;
@ -109,7 +109,7 @@ NSString *NSControlTextDidChangeNotification = @"NSControlTextDidChangeNotificat
NSLog(@"NSControl: copyWithZone\n");
// make sure the new copy also has a new copy of the cell
[c setCell: [cell copy]];
[c setCell: [[cell copy] autorelease]];
return c;
}
@ -127,6 +127,8 @@ NSString *NSControlTextDidChangeNotification = @"NSControlTextDidChangeNotificat
if (![aCell isKindOfClass:[NSCell class]])
return;
[aCell retain];
[cell release];
cell = aCell;
}