[fpc-devel] Memory leak @ tobjectdef.getcopy
    Sven Barth 
    pascaldragon at googlemail.com
       
    Mon Dec  2 08:02:59 CET 2019
    
    
  
Am 01.12.2019 um 18:08 schrieb Blaise at blaise.ru:
> On 01.12.2019 19:15, Blaise at blaise.ru wrote:
>> With the following two exceptions, there are no other 
>> assigned(vmtentries) checks before dereferencing.
>
> And one assertion @ TVMTBuilder.generate_vmt :
>>     if assigned(_class.childof) then
>>       begin
>>         if not assigned(_class.childof.vmtentries) then
>>           internalerror(200810281);
>>         _class.copyvmtentries(_class.childof);
>>       end;
>
> Patch is amended.
> (Originally, that was a part of another changeset, but I reckon it 
> makes more sense here.)
>
Applied in r43626 with the exception of the change from vmtentries.Free 
to vmtentries.Destroy. Modus operandi inside the compiler is to use 
.Free, not .Destroy (I know, there are a few exceptions, but that 
doesn't change the modus operandi).
It would be up to the compiler's optimizations that it can lower the 
.Free to .Destroy (it currently probably won't, but it shouldn't be 
/impossible/ to do).
Regards,
Sven
    
    
More information about the fpc-devel
mailing list