Destroys a form
$form
This function frees the memory resources used by the form and all of the components which have been added to the form (including those components which are on subforms). Once a form has been destroyed, none of the form's components can be used.
form
Form component, which is going to be destroyed
No value is returned.