[Lazarus] Difference between FreeThenNil and FreeAndNil
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Wed Apr 27 12:20:33 CEST 2011
On Wed, 27 Apr 2011, Alexander Klenin wrote:
> 2011/4/27 <michael.vancanneyt at wisa.be>:
>> Which is simply wrong coding in the destructor.
>>
>> I don't think you should provide for this. This is encouraging people to
>> write bad code. They should get an error, and correct their code.
>
> Well, I have already said this is not a good practice, haven't I?
> But, it is not that easy to fix -- the calls are usually separated
> by many levels of nesting, including the message loop.
I would like to see a non-trivial example of this.
Even if you can produce one (which I doubt), it doesn't change the fact that
it is wrong coding.
Michael.
More information about the Lazarus
mailing list