[fpc-devel] memleak in fpdoc
Vincent Snijders
vincent.snijders at gmail.com
Sat Nov 6 21:07:47 CET 2010
2010/11/5 Michael Van Canneyt <michael at freepascal.org>:
>
>
> On Fri, 5 Nov 2010, Vincent Snijders wrote:
>
>> Hi,
>>
>> I am trying to fix the memleaks in fpdoc. Attached is a patch for
>> pascal parser package.
>>
>> There are still more leaks, but that is for another time.
I debugged some more. In procedure
ProcessInheritanceStrings(inhInfo:TStringList) the inhclass string
list is created, but not freed. The trivial patch below fixes that.
Another problem is the line:
if not assigned(CreateAliasType(alname,clname,cls,cls2)) then
The return value of CreateAliasType doesn't seem to be freed/released.
I don't know how to fix that.
Vincent
Index: utils/fpdoc/dglobals.pp
===================================================================
--- utils/fpdoc/dglobals.pp (revision 16307)
+++ utils/fpdoc/dglobals.pp (working copy)
@@ -856,7 +856,8 @@
cls2:=ResolveAndLinkClass(clname,j=0,cls);
end;
end;
-end;
+ inhclass.free;
+ end;
var
s, Name: String;
More information about the fpc-devel
mailing list