<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">FormClose is opposite to FormShow. The use-case is a modal form which exists always (i.e. is autocreated when app. starts and is freed when app. end).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">You can call ShowModal, create some objects in FormShow and free them in FormClose.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: "Santiago A. via lazarus" <lazarus@lists.lazarus-ide.org><br />
> Komu: lazarus@lists.lazarus.freepascal.org<br />
> Datum: 08.09.2020 21:00<br />
> Předmět: [Lazarus] FormClose<br />
></p>
Hi:<br />
<br />
I recently have read a message where an object was created in the <br />
FormCreate and was freed in the formClose. What if the form is not <br />
freed? I think that the the natural place to free objects created in <br />
formCreate is FormDestroy.<br />
In fact, I usually follow this pairs<br />
Created in FormCreate, freed in FormDestroy<br />
Created in FormActivate, freed in FormDeactivate<br />
Created in FormShow, freed in FormHide<br />
<br />
I seldom use formClose, just to change the default closeAction. I can't <br />
see what else is formClose for. Do you use it form any other case?<br />
<br />
-- <br />
Saludos<br />
<br />
Santiago A.<br />
<br />
-- <br />
_______________________________________________<br />
lazarus mailing list<br />
lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />