[Lazarus] Difference between FreeThenNil and FreeAndNil
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Wed Apr 27 09:15:02 CEST 2011
On Wed, 27 Apr 2011, Alexander Klenin wrote:
> On Wed, Apr 27, 2011 at 13:30, Luiz Americo Pereira Camara
> <luizmed at oi.com.br> wrote:
>> After reading http://bugs.freepascal.org/view.php?id=19238 i wondered what's
>> the reason to FreeThenNil procedure found in LCLProc.
>>
>> What's the advantage over SysUtils FreeAndNil ?
>
> That's a hack to work around the fact that some destructors may
> access the object being destroyed via the given pointer instead of directly.
Can you explain this ?
Because to my understanding the code does exactly the same.
Michael.
More information about the Lazarus
mailing list