TcxOwnedInterfacedPersistent._Release Method
The reference counter decrement function of the interfaced property set.
Declaration
function _Release: 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 _Release function’s implementation always returns -1. This value indicates that the reference counter does not decrement when a reference to a TcxOwnedInterfacedPersistent class descendant instance is destroyed (for example, when you assign nil to the property that refers to this class instance via a supported interface).
You must explicitly release a TcxOwnedInterfacedPersistent 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.