Show/Hide Toolbars

RiverSoftAVG Products Help

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,


property RefCount: TRefCount read FRefCount implements IUnknown;

The TRefCount class will take care of reference counting for the Owner object and free the Owner when the reference count equals zero.

Namespace: RefCount

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb