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:
sfraser%netscape.com
2002-12-24 01:59:04 +00:00
parent 6ed39efb6f
commit a7a2ea05f3
2 changed files with 4 additions and 4 deletions

View File

@@ -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]);

View File

@@ -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]);