[fpc-devel] memleak in fpdoc
Michael Van Canneyt
michael at freepascal.org
Sun Nov 7 12:14:45 CET 2010
On Sat, 6 Nov 2010, Vincent Snijders wrote:
> 2010/11/5 Michael Van Canneyt <michael at freepascal.org>:
>> On Fri, 5 Nov 2010, Vincent Snijders wrote:
>>> 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.
It should be freed, because it is added to the list of declarations:
in CreateAliasType should do it.
> Index: utils/fpdoc/dglobals.pp
> --- utils/fpdoc/dglobals.pp (revision 16307)
> +++ utils/fpdoc/dglobals.pp (working copy)
> @@ -856,7 +856,8 @@
> + inhclass.free;
> + end;
> s, Name: String;
> fpc-devel maillist - fpc-devel at lists.freepascal.org
More information about the fpc-devel