TcxOwnedInterfacedPersistent._AddRef Method
The reference counter increment function of the interfaced property set.
Declaration
function _AddRef: Integer; stdcall;
Returns
Type |
---|
Integer |
Remarks
The _AddRef and _Release functions increment and decrement an interfaced persistent object’s reference counter, and are not intended to be used directly from your code.
This _AddRef function’s implementation always returns -1. This value indicates that the reference counter does not increment when you create a new reference to a TcxOwnedInterfacedPersistent class descendant instance. For example, a successful QueryInterface function call returns a reference to this object and invokes the _AddRef function internally.
You must explicitly release this object when an application no longer needs it (that is, no other object within the application refers to this class instance via an interface) to avoid memory leaks.