gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory Leak in NSString.m


From: Thorano
Subject: Memory Leak in NSString.m
Date: 21 Feb 2001 21:25:51 +0100

There is a very minor memory leak in the function parsePlItem. If
there's an error in the parsing of a Dictionary or an Array, the
function returns nil but does not release the container it has just
allocated. 

In this function and the one it depends on, the created object are not
autoreleased. And I think it would simplify the code if they are. In
the present code, we must release by hand every created object in the
case of an error and that's the origine of the current memory leak

I included a patch that fix the memory leak by using the autorelease
mechanism. I also modify GSPropertyList as a consequence of this
patch. 

Attachment: NSString.diff
Description: patch of NSString.m rev 1.192






reply via email to

[Prev in Thread] Current Thread [Next in Thread]