RAD Studio VCL Reference
|
Allocates memory and constructs a safely initialized instance of a component.
constructor Create(AOwner: TComponent); override;
virtual __fastcall TShellNameSpace(TComponent * AOwner);
All objects have a Create method that constructs the object. TComponent redefines Create so that, for components, Create also:
establishes the relationship of a component and its Owner, as indicated by the AOwner parameter
sets the ComponentStyle property to csInheritable, meaning that the component can be inherited by a descendant form type
It is not necessary to explicitly create components added in the form designer. These components are created automatically when the application is run, and they are destroyed when the application is closed.
For components created programmatically, that is, not created in the form designer, call Create and pass in an owner component as the AOwner parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use Free when it needs to be destroyed.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|