[Lazarus] Where is form instance being NIL'ed
Marc Weustink
marc at dommelstein.net
Tue Oct 14 17:04:05 CEST 2008
Graeme Geldenhuys wrote:
> On Tue, Oct 14, 2008 at 4:20 PM, Mattias Gärtner
> <nc-gaertnma at netcologne.de> wrote:
>> The variable pointer is not stored, so can not be set to nil by the LCL. Afaik
>> it is the same with the VCL.
>>
>> Why not set it to nil in TForm.Destroy?
>
> That ties the class to a external instance variable. I thought there
> might be a more elegant way of handling this. But if there isn't,
> then that's what I'll have to do. :)
>
> Is that the recommended method of handling non-modal forms in Delphi as well?
In Delphi I manage nonmodal forms myself in the mainform (and set them
to in in Form.onDestroy). I don't use those global ones and remove them.
Marc
More information about the Lazarus
mailing list