Fix leaks in the RDF data source.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135606 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -380,7 +380,7 @@
|
||||
RDFOutlineViewItem* item = [mDictionary objectForKey:key];
|
||||
if (!item)
|
||||
{
|
||||
item = [[RDFOutlineViewItem alloc] init];
|
||||
item = [[[RDFOutlineViewItem alloc] init] autorelease];
|
||||
[item setResource: aRDFResource];
|
||||
[mDictionary setObject:item forKey:key]; // retains |item|
|
||||
}
|
||||
@@ -396,7 +396,7 @@
|
||||
- (void)updateItemProperties:(id)item enumerateChildren:(BOOL)doChildren
|
||||
{
|
||||
BOOL isExpandable = NO;
|
||||
NSMutableArray* itemChildren = doChildren ? [[NSMutableArray alloc] initWithCapacity:10] : nil;
|
||||
NSMutableArray* itemChildren = doChildren ? [[[NSMutableArray alloc] initWithCapacity:10] autorelease] : nil;
|
||||
|
||||
nsCOMPtr<nsIRDFResource> itemResource = dont_AddRef([item resource]);
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
RDFOutlineViewItem* item = [mDictionary objectForKey:key];
|
||||
if (!item)
|
||||
{
|
||||
item = [[RDFOutlineViewItem alloc] init];
|
||||
item = [[[RDFOutlineViewItem alloc] init] autorelease];
|
||||
[item setResource: aRDFResource];
|
||||
[mDictionary setObject:item forKey:key]; // retains |item|
|
||||
}
|
||||
@@ -396,7 +396,7 @@
|
||||
- (void)updateItemProperties:(id)item enumerateChildren:(BOOL)doChildren
|
||||
{
|
||||
BOOL isExpandable = NO;
|
||||
NSMutableArray* itemChildren = doChildren ? [[NSMutableArray alloc] initWithCapacity:10] : nil;
|
||||
NSMutableArray* itemChildren = doChildren ? [[[NSMutableArray alloc] initWithCapacity:10] autorelease] : nil;
|
||||
|
||||
nsCOMPtr<nsIRDFResource> itemResource = dont_AddRef([item resource]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user