mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:10:38 +00:00
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:
parent
1c8d394839
commit
10ada90f30
11 changed files with 112 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue