RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TObject::FreeInstance Method

Deallocates memory allocated by a previous call to the System::TObject::NewInstance method.

Pascal
procedure FreeInstance; virtual;
C++
virtual __fastcall FreeInstance();

All destructors call System::TObject::FreeInstance automatically to deallocate memory that was allocated by overriding System::TObject::NewInstance.  

Do not call System::TObject::FreeInstance directly. System::TObject::FreeInstance should be overridden if System::TObject::NewInstance was overridden to change the way the object's instance data was allocated. 

Like System::TObject::NewInstance, System::TObject::FreeInstance uses the value returned from System::TObject::InstanceSize to deallocate the object's memory. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!