[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TDataModule.Destroy

Destroys the TDataModuleinstance.

Declaration

Source position: classesh.inc line 1521

public destructor TDataModule.Destroy; override;

Description

Destroydestroys the TDataModuleinstance. If the OldCreateOrderproperty is Truethe OnDestroyevent handler is called prior to destroying the data module.

Before calling the inherited destroy, the RemoveDataModulehandler is called if it is set, and Selfis passed as a parameter.

Errors

An event can be raised during the OnDestroyevent handler.

See also

TDataModule.OnDestroy

  

Event handler, called when the datamodule is destroyed.

RemoveDataModule

  

Handler called when a TDataModuleinstance is freed.