Hello wonderful people - this may seem like a bit of a "noob" question, and I apologize for asking it, but it's not something that's easy to Google, and I've not learned this particular thing.
I've got a Main Application, and It is creating a dynamic form, which is non-modal. This means that the procedure which is creating the form is not getting an opportunity to free it once it is closed.
What's the safest way to free this form once it's been closed? Right now, on the dynamically created form, I have a OnFormClose event which has a statement Sender.Free;
I'm guessing that's the right thing to do but I'm not sure how to verify that it is. The two blocks of code show what I mean.
Thanks for reading.
procedure TMainForm.AnotherFormExecute(Sender: TObject);
AnotherForm : TAnotherForm;
AnotherForm := TAnotherForm.Create(nil);
procedure TAnotherForm.FormClose(Sender: TObject; var Action: TCloseAction);