RAD Studio VCL Reference
|
Responds when the caller releases a reference to this object's interface.
function _Release: Integer; stdcall;
__fastcall __stdcall int _Release();
When an application releases an interface that is implemented by TCustomVariantType or one of its descendants, it automatically calls __Release. Typically, interfaced objects use the __Release method to decrement a reference count. When the reference count drops to zero, the object is automatically freed.
TCustomVariantType implements its own version of the IInterface methods _AddRef and __Release that avoid this typical behavior. An application should have only a single instance of TCustomVariantType, and that instance should not be auto-freed when it is not in use. Thus, TCustomVariantType implements __Release so that it always returns –1.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|