Vcl.Forms.TCustomForm.Release

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Release;

C++

void __fastcall Release();

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TCustomForm

Description

Destroys the form and frees its associated memory.

Use Release to destroy the form and free its associated memory.

Release does not destroy the form until all event handlers of the form and event handlers of components on the form have finished executing. Release also guarantees that all messages in the form's event queue are processed before the form is released. Any event handlers for the form or its children should use Release instead of Free (Delphi) or delete (C++). Failing to do so can cause a memory access error.

Note: Release returns immediately to the caller. It does not wait for the form to be freed before returning.

See Also