[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Marks the form for destruction.
Source position: forms.pp line 725
public procedure TCustomForm.Release; |
Release is a procedure used to request destruction of the current form instance.
Release is called from the ShowModal method when a value other than mrNone is returned in the ModalResult property - including when the Application has been terminated while the dialog is active. While the method is public (just like in Delphi), it is not meant to be called from application code; ShowModal handles freeing the form instance in its processing loop. Calling Release when the form instance has already been freed in ShowModal raises an Access Violation (AV). You can use Close / OnClose to set the form close action to caFree to force the dialog to be closed and freed.
Release checks for a TApplication instance in the Application singleton. If it is assigned (contains a value other than Nil), its ReleaseComponent method is called to free the form instance by posting an asynchronous application message. When Application is not assigned, the Free method is called to destroy the form instance.
|
Displays the form as a modal dialog. |
|
|
Specifies the return value for a form (or dialog) displayed modally. |
|
|
Closes the form. |
|
|
Handler called when the form is closed. It determines what happens to the form (destroy, hide, etc.). |
|
|
Destructor for the class instance. |
|
|
Safely destroys a component used in the application. |
|
|
The TApplication singleton. |
|
|
Represents actions that can occur when a form is closed. |
|
Version 4.0 | Generated 2025-05-03 | Home |