Hi,  thanks, I now have two working solutions and a lot more knowledge,
although why Delphi was written this way I don't understand.


Solution 1 (Mike)

in FormCreate: ACheck[i] := TCheckBox.Create(P);
in FormClose: ACheck[i].Free;
in FormDestroy: P := nil;


Solution 2 (Bob)

in FormCreate: ACheck[i] := TCheckBox.Create(nil);
in FormClose: ACheck[i].Free;



There was thought that if you do ACheck[i] := TCheckBox.Create(P); then P
has the responsibility to Free and gets messed if it can't because it was
already freed. I tried creating with owner P and not freeing, hoping that P
might Free for me. This does not work.

Is there a downside to having unowned components on a form?


Bobby Clarke


[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to