TInterfacedObject
[Properties (by Name)][Methods (by Name)][Events (by Name)]
TObject descendent implementing the IUnknown interface
Declaration
Source position: objpash.inc line 301
Type
TInterfacedObject = class (TObject, IUnknown)
protected
FRefCount : LongInt;
FDestroyCount : LongInt;
function QueryInterface(const iid: TGuid; out obj) : LongInt;
function _AddRef : LongInt;
function _Release : LongInt;
public
destructor Destroy; Override;
procedure AfterConstruction; Override;
procedure BeforeDestruction; Override;
class function NewInstance : TObject; Override;
RefCount : LongInt;
end
;
Description
TInterfacedObject is a descendent of TObject which implements the IUnknown interface. It can be used as a base class for all classes which need reference counting.
Members
Member | Type | Visibility | Description |
---|---|---|---|
AfterConstruction | Method | public | Handle reference count properly. |
BeforeDestruction | Method | public | Check reference count. |
Destroy | Method | public | Destroy interfaced object |
FDestroyCount | Field | protected | |
FRefCount | Field | protected | |
NewInstance | Method | public | Create a new instance |
QueryInterface | Method | protected | |
RefCount | Property | public | Return the current reference count |
_AddRef | Method | protected | |
_Release | Method | protected |
Inheritance
Class | Description |
---|---|
TInterfacedObject(IUnknown) | TObject descendent implementing the IUnknown interface |
See also
Name | Description |
---|---|
IUnknown | Basic interface for all COM-based interfaces |
LongInt | A signed 32-bits integer |
LongInt | A signed 32-bits integer |
LongInt | A signed 32-bits integer |
TObject | Base class of all classes. |