Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxOwnedInterfacedPersistent._Release Method

The reference counter decrement function of the interfaced property set.

#Declaration

Delphi
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.

See Also