diff options
Diffstat (limited to 'Source/SPFavoritesController.m')
-rw-r--r-- | Source/SPFavoritesController.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPFavoritesController.m b/Source/SPFavoritesController.m index c53bbae3..45eb5c9a 100644 --- a/Source/SPFavoritesController.m +++ b/Source/SPFavoritesController.m @@ -273,8 +273,6 @@ static SPFavoritesController *sharedFavoritesController = nil; SPTreeNode *node = [self _constructBranchForNodeData:favorite]; [[favoritesNode mutableChildNodes] addObject:node]; - - [node release]; } [[rootNode mutableChildNodes] addObject:favoritesNode]; @@ -307,24 +305,26 @@ static SPFavoritesController *sharedFavoritesController = nil; treeNode = [[SPTreeNode alloc] initWithRepresentedObject:node]; + [node release]; + [treeNode setIsGroup:YES]; for (NSDictionary *favorite in [nodeData objectForKey:SPFavoriteChildrenKey]) { SPTreeNode *innerNode = [self _constructBranchForNodeData:favorite]; - [[treeNode mutableChildNodes] addObject:innerNode]; - - [innerNode release]; + [[treeNode mutableChildNodes] addObject:innerNode]; } } else { node = [[SPFavoriteNode alloc] initWithDictionary:nodeData]; treeNode = [[SPTreeNode alloc] initWithRepresentedObject:node]; + + [node release]; } - return treeNode; + return [treeNode autorelease]; } /** |