Marc Weustink marc at dommelstein.net
Sun Oct 6 17:36:19 CEST 2002

At 14:24 6-10-2002 +0200, Florian Klaempfl wrote:
>At 02:14 04.10.2002, you wrote:
>>Am I missing something or is TObject.BeforeDestruction not automagically 
>>called before Destructing an Object ?
>As Peter said, it's 1.1. Do you need it? Eventually, it could be backported.

Hmm... do I/we need it ?
I encountered this while debugging Lazarus to find out why an OnDestroy 
event of a form isn't called.
This and other things are handled in the BeforeDestruction. As a workaround 
I added a call to BeforeDestruction for the 1.0 versions in the TCustomForm 
Destructor. So it is more or less working and things get called in the 
right order, but might result in strange things as soon as people start to 
override our TCustomForm destructor.

I don't know what effort it would be to backport it, but if it is not much, 
please do, else I leave it to your own judgement (Lazarus will use the 1.1 
compiler one day in the future :).


More information about the fpc-devel mailing list