[fpc-pascal] Two versions of freemem() - are they equal

Marco van de Voort fpc at pascalprogramming.org
Wed Dec 30 23:56:45 CET 2020


Op 2020-12-30 om 23:54 schreef Graeme Geldenhuys via fpc-pascal:
> Do both these method yield the same result, or is one better (performance,
> safer?) that the other?
>
>
> procedure FreeMem(p:pointer;Size:ptruint);
> procedure FreeMem(p:pointer);
They are the same.   TP required size for deallocation, Delphi and FPC 
don't.  The overload with size is for TP compatibility.


More information about the fpc-pascal mailing list