5
When I create an object dynamically, for example a form, I do so:
Formulario := TFormulario.Create(nil);
try
Formulario.ShowModal;
finally
Formulario.Free;
end;
What’s the difference in creating an object by passing the following values to the parameter Aowner in the method Create?
Formulario := TFormulario.Create(Application);
Formulario := TFormulario.Create(nil);
Formulario := TFormulario.Create(Self);
I don’t remember reading what to use
Application
influence performance. Source on this?– EMBarbosa
@Embarbosa Source: http://delphi.about.com/od/adptips2005/qt/nilselfapp.htm
– Leonel Sanches da Silva
Thank you. I think I should quote the sources in the reply. + 1
– EMBarbosa