Skip to content

TInterfacedObject

TObject descendent implementing the IUnknown interface.

Declaration

Source position: objpash.inc line 380

type

  TInterfacedObject = class(TObject, IUnknown)
  public
    destructor Destroy;
    procedure AfterConstruction;
    procedure BeforeDestruction;
    class function NewInstance : TObject;
    property RefCount: LongInt; {r}
  end;

Inheritance

Implements: IUnknown

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.

Properties

Member Visibility Description
RefCount read only public Return the current reference count.
See all Properties

Methods

Member Visibility Description
AfterConstruction public Handle reference count properly.
BeforeDestruction public Check reference count.
Destroy public Destroy interfaced object.
NewInstance public Create a new instance.
See all Methods

See also

Name Description
IUnknown Basic interface for all COM-based interfaces.
TObject Base class of all classes.