The TROInterfacedObject class is a custom implementation of the object implementing the IUnknown interface. All other classes derived from this one benefit from the memory management technology based on the reference counting (COM-style).
Unlike the VCL TInterfacedObject class, all methods introduced by the IUnknown interface are virtual, thus allowing further reference counting customization.
This class is primarily for internal use but can be used as the base class to build users' own hierarchies of interfaced objects.


  • Unit: uROInterfacedObject.pas



Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read write

Class Methods

NewInstance  override

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject