System.Classes.TDataModule.OnDestroy
Delphi
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
C++
__property TNotifyEvent OnDestroy = {read=FOnDestroy, write=FOnDestroy};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | System.Classes.pas System.Classes.hpp |
System.Classes | TDataModule |
Description
Occurs when the data module is about to be destroyed.
Write an OnDestroy event handler to take specific actions when an application frees a data module. For example, if the unit code for the data module instantiates any objects of its own, such as string lists, the OnDestroy event handler can be used to free those objects.
OnDestroy is an event handler of type System.Classes.TNotifyEvent.