Using valgrind I noticed multiple memory leaks (most seem to be false
positives) when running a GNUstep app.
I *think* the following patch fixes two real leaks. Can someone review
this ?
Philippe
Index: Source/NSPropertyList.m
===================================================================
--- Source/NSPropertyList.m (révision 31995)
+++ Source/NSPropertyList.m (copie de travail)
@@ -305,11 +305,11 @@
[self unescape];
if (opts == NSPropertyListMutableContainersAndLeaves)
{
- o = [value mutableCopy];
+ o = AUTORELEASE([value mutableCopy]);
}
else
{
- o = [value copy];
+ o = AUTORELEASE([value copy]);
}
ASSIGN(plist, o);
}
@@ -1750,6 +1750,7 @@
}
NSZoneFree(NSDefaultMallocZone(), base);
obj = [[NSString alloc] initWithCharacters: map length: len];
+ NSZoneFree(NSDefaultMallocZone(), map);
[output appendData: [obj dataUsingEncoding: NSUTF8StringEncoding]];
RELEASE(obj);
}
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev