Skip to main content

TcxIUnknownObject Class

The base class for all classes that implement non-persistent objects that support one or more interfaces without automatic reference count (ARC).

Declaration

TcxIUnknownObject = class(
    TObject,
    IInterface
)

Remarks

VCL provides both the manual and automatic class instance management models. In the latter case, an application automatically releases an object when no other object accesses it via an interface. Each object accessible via an interface (that is, an interfaced object) has a dedicated reference counter, and the application frees up such an object when its reference counter reaches 0. Different objects can provide different implementations of the _AddRef and _Release functions designed to increment and decrement the corresponding reference counter every time a reference is created or destroyed.

The TcxIUnknownObject class implements the IUnknown interface in a manner that disables automatic reference count for all the class’ descendants regardless of how your application uses them. The application must always explicitly free up such objects to avoid memory leaks.

Do not use the TcxIUnknownObject class directly. Use its descendants instead.

Implements

Inheritance

TObject
TcxIUnknownObject
See Also