System.TObject.InitInstance

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

class function InitInstance(Instance: Pointer): TObject {$IFDEF AUTOREFCOUNT} unsafe {$ENDIF};

C++

__classmethod __unsafe TObject* __fastcall InitInstance(void * Instance);

Properties

Type Visibility Source Unit Parent
function public
System.pas
systobj.h
System TObject

Description

Initializes a newly allocated object instance to all zeros and initializes the instance's virtual method table pointer.

You should not call InitInstance directly. InitInstance is called by NewInstance when an object is created. When overriding NewInstance, be sure to call InitInstance as the last statement.

InitInstance is not virtual, so you cannot override it. Instead, initialize any data for an object in the constructor.

See Also