mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Fix leak and add to maps in makeItemWithIdentifier:forIndexPath:, per review
This commit is contained in:
parent
cd52649076
commit
8afffbb121
1 changed files with 8 additions and 4 deletions
|
@ -1577,6 +1577,14 @@ static NSString *_placeholderItem = nil;
|
|||
NSLog(@"Could not load model %@", nib);
|
||||
}
|
||||
|
||||
RELEASE(nib);
|
||||
|
||||
// Add to maps...
|
||||
[_itemsToIndexPaths setObject: indexPath
|
||||
forKey: item];
|
||||
[_indexPathsToItems setObject: item
|
||||
forKey: indexPath];
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@ -1722,10 +1730,6 @@ static NSString *_placeholderItem = nil;
|
|||
|
||||
[_itemsToAttributes setObject: attrs
|
||||
forKey: item];
|
||||
[_itemsToIndexPaths setObject: path
|
||||
forKey: item];
|
||||
[_indexPathsToItems setObject: item
|
||||
forKey: path];
|
||||
|
||||
[self addSubview: v];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue