RAD Studio VCL Reference
TObject Class

System::TObject is the ultimate ancestor of all objects and components.

TObject = class;
class TObject;


System::TObject encapsulates fundamental behavior common to objects by introducing methods that 

create, maintain and destroy instances of the object by allocating, initializing, and freeing required memory. 

respond when object instances are created or destroyed. 

return class-type and instance information on an object and runtime type information (RTTI) about its published properties.  

support message handling. 

support interfaces that the object implements. 

Use System::TObject as an immediate base class when declaring simple objects that do not need to persist (are not saved and reloaded) and that do not need to be assigned to other objects. 

Much of the capability of objects is established by methods that System::TObject introduces. Many of these methods are used internally by IDEs and are not intended for users to call directly. Others are overridden in descendant objects that have more complex behavior. 

Although System::TObject is the based object of a component framework, not all objects are components. All component classes are descended from TComponent.

Note: System::TObject is never directly instantiated. Although it does not use programming language features that prevent instantiation, System::TObject is an abstract class.


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