|
TRefCount
|
The TRefCount class implements the IUnknown interface for an Owner object. The TRefCount class makes it easy to quickly make a class to implement the IUnknown interface by using delegation instead of descending from TInterfacedObject, TComponent or similar class. The Owner object just needs to declare a property of this type with the implements keyword and allocate (and free) the memory for the TRefCount class. For example,
Delphi
|