[fpc-devel] memleak in fpdoc

Michael Van Canneyt michael at freepascal.org
Sun Nov 7 13:53:17 CET 2010



On Sun, 7 Nov 2010, Marco van de Voort wrote:

> In our previous episode, Michael Van Canneyt said:
>>>   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:
>>    module.interfacesection.Declarations.Add(Result);
>
> That line was added by me yesterday in response to the same mail.

Ah. Well, since you applied the patch, I didn't bother to look at 
the original code.

Did you remove the .addref or was it not necessary ?

Michael.



More information about the fpc-devel mailing list