RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWebModuleFactoryList.Destroy Destructor

Disposes of an object instance.

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

Do not call ~Destroy directly. Instead, use the delete keyword when destroying VCL objects.  

~Destroy deallocates memory. Descendant objects usually define a destructor that is customized for that particular kind of object.

Note: If an exception escapes from the constructor, the destructor is called to destroy the partially constructed object instance that failed to initialize completely. Therefore, destructors should check that allocated resources, such as handles, were actually allocated before trying to release them, since their value might be zero.
Warning: Never destroy a component from one of its own event handlers or from the event handler of a component it owns or contains. For example, don't destroy a button, or the form that owns the button, in the button's OnClick event handler.
To destroy a form, call its Release method, which destroys the form and releases the memory allocated for it after all its event handlers and those of the components it contains have executed. 

 

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