System.Classes.TInterfacedPersistent._Release
Delphi
function _Release: Integer; stdcall;
C++
int __stdcall _Release();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | System.Classes.pas System.Classes.hpp |
System.Classes | TInterfacedPersistent |
Description
Decrements the reference count for the interfaced object's interface.
_Release implements the IInterface method, _Release, which decrements the reference count of an interface and returns the current reference count. For some interfaces, when this causes the reference count to drop to zero, the object frees itself.
If the interfaced persistent object has an Owner and that owner supports an interface, then _Release simply calls the _Release method of the Owner. Otherwise, it simply returns –1.