RAD Studio VCL Reference
IInterface._Release Method

Decrements the reference count for this interface.

function _Release: Integer; stdcall;
__fastcall __stdcall int _Release();

The Delphi compiler automatically generates a call to __Release whenever a reference to this interface goes out of scope. For most implementations, __Release decrements the reference count for the interface and returns the new reference count. When the reference count drops to zero, the object is automatically freed.

Note: Implementation objects can implement __Release so that it does not perform any reference counting. For such objects, the reference count never drops to zero and the object is not automatically freed. In these cases, it is the application's responsibility to free the object.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!