mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Do not retain/release the data source; it's like a delegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11171 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9ba621a145
commit
449ae8ff09
1 changed files with 6 additions and 4 deletions
|
@ -283,7 +283,6 @@ _isCellEditable (id delegate, NSArray *tableColumns,
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
TEST_RELEASE (_dataSource);
|
||||
RELEASE (_gridColor);
|
||||
RELEASE (_backgroundColor);
|
||||
RELEASE (_tableColumns);
|
||||
|
@ -556,7 +555,8 @@ _isCellEditable (id delegate, NSArray *tableColumns,
|
|||
@"tableView:objectValueForTableColumn:row:"];
|
||||
}
|
||||
|
||||
ASSIGN (_dataSource, anObject);
|
||||
/* We do *not* retain the dataSource, it's like a delegate */
|
||||
_dataSource = anObject;
|
||||
[self tile];
|
||||
[self reloadData];
|
||||
}
|
||||
|
@ -2290,7 +2290,9 @@ byExtendingSelection: (BOOL)flag
|
|||
float x_pos;
|
||||
|
||||
if (_dataSource == nil)
|
||||
return;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Using columnAtPoint: here would make it called twice per row per drawn
|
||||
rect - so we avoid it and do it natively */
|
||||
|
@ -2869,7 +2871,7 @@ byExtendingSelection: (BOOL)flag
|
|||
|
||||
self = [super initWithCoder: aDecoder];
|
||||
|
||||
_dataSource = RETAIN([aDecoder decodeObject]);
|
||||
_dataSource = [aDecoder decodeObject];
|
||||
_tableColumns = RETAIN([aDecoder decodeObject]);
|
||||
_gridColor = RETAIN([aDecoder decodeObject]);
|
||||
_backgroundColor = RETAIN([aDecoder decodeObject]);
|
||||
|
|
Loading…
Reference in a new issue