Skip to content

TDataModule.Destroy

Destroys the TDataModule instance.

Declaration

Source position: classesh.inc line 2311

public 
  destructor Destroy;  Override;

Description

Destroy destroys the TDataModule instance. If the OldCreateOrder property is True the OnDestroy event handler is called prior to destroying the data module.

Before calling the inherited destroy, the RemoveDataModule handler is called if it is set, and Self is passed as a parameter.

Errors

An event can be raised during the OnDestroy event handler.

See also

Name Description
RemoveDataModule Handler called when a TDataModule instance is freed.
TDataModule.OnDestroy Event handler, called when the datamodule is destroyed.