RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplication.Destroy Destructor

Destroys the application instance and all of its associated memory.

Pascal
destructor Destroy; override;
C++
virtual __fastcall ~TApplication();

Never call Application.Destroy or Application.Free. Instead, use the application's Terminate method to end the application. 

Destroy signals that the application has been deactivated before calling the inherited destructor. It then frees memory for hooked windows, the application instance, other object instances and lists that were created at application startup or that accumulated during execution 

Since the Application owns all forms (usually), it destroys these forms in its destructor. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!