 <p>You would need the parameter pass to <code>Destruir</code> to be a <code>var</code> parameter so that the modification you make to the passed argument to modify the passed variable, rather than a local copy of it.</p> <pre><code>procedure TForm1.Destruir(var aForm: TForm); begin FreeAndNil(aForm); end; </code></pre> <p>Of course, this function is a little needless since you may as well just call <code>FreeAndNil</code> directly instead of calling <code>Destruir</code>.</p>