Difference between Close() and delete on a TForm


2004-10-13 08:15:50 PM
cppbuilder102
Hi,
What's the difference between these 2 codes :
TMainForm::Button1OnClick(...)
{
frm = new TMyForm;
frm->Show();
}
TMainForm::Button2OnClick(...)
{
delete frm;
}
and :
TMainForm::Button1OnClick(...)
{
frm = new TMyForm;
frm->Show();
}
TMainForm::Button2OnClick(...)
{
frm->Close();
}
with in the TForm :
TMyForm::OnClose(...)
{
Action = caFree;
}
?
Thanks,
PurL