It really depends on how you manage the lifetimes of your forms. Making your Mainform the owner of all subforms and dialogs allows you to rely on the MainForm 'trying' to release them at app end.
However, if you use some other way of managing the lifetimes of your subforms, or how you keep references to them, then you have more control over what happens when the subforms get released, in which case you can safely use nil as the value for the owner parameter. I don't quite understand what you mean by "can't create another form of the same class"? You should be able to create any number of instances of the same class, regardless of whether there is still a previous instance floating around or not. The only difference might be if you're using Application.CreateForm to create your sub forms. Can't really offer more without specifics. Cheers, Conor -----Original Message----- From: Neven MacEwan [mailto:[EMAIL PROTECTED] I'm sure someones asked this question before but..... It seems trad to make the 'application' owner of Dialogs and forms if form := TForm.Create(Application); Is this strictly necesary? reason being that if anything fails during the forms destructuction, the application wont allow another form of the same class and also it results in AV on the exit of the app opinions please? --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
