[lazarus] Order of destruction in TCustomListBox

Micha Nelissen micha at neli.hopto.org
Sun Dec 14 08:57:52 EST 2003


Marc Weustink wrote:

> At 22:22 13-12-2003, Micha Nelissen wrote:
> 
>> Mattias Gaertner wrote:
>>
>>>
>>> What do you mean?
>>
>>
>> I don't like the fact of pascal that it's possible that overriden 
>> functions get called although their constructor hasn't run or their 
>> destructor has run.
> 
> 
> That has nothing to do with object pascal, but all with the one who 
> designed the classes you're using. IMO calling virtuals in yuor 
> constructor/destructor isn't a bad thing if you know what you're doing. 
> If things has to be called in a certain order, that is nothing different 
> than programming other routines.

I think you didn't understand what I was saying, please read my reply to 
Mattias for an example.

Regards,

Micha.






More information about the Lazarus mailing list