zeljko wrote:
On Friday 22 June 2007 14:51, Marc Weustink wrote:
zeljko wrote:
Compiled simple project with -gh , and it seem that TForm doesn't call
Free() for it's children (created at design time) eg.

MainForm -> Form1 ->
                      -> TRadioGroup with 4 radio buttons
                      -> TButton -> calls Close() of Form1.

Tested under linux with:
gtk, gtk2, qt - fpc- 2.0.4

If I explicitely call Free() for each of children in Form1.OnClose() then
it calls children's destructors, but still remains unfreed blocks for
form itself ?!?

compiler ? lcl ?  any ?
You don't get an exception or so ?

I wonder if it is allowed to call close in an eventhandler of the same
form. If the form gets freed, one should use Release.

I didn't call Free() for form itself, just for it's children, because I've founded that eg. DestroyHandle() is not called (for children controls).

But, doesn't the close indirectly call free ?

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to