Show: Delphi C++
Display Preferences

System.TInterfacedObject.RefCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property RefCount: Integer read GetRefCount;

C++

__property int RefCount = {read=FRefCount, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.pas
systobj.h
System TInterfacedObject

Description

Indicates the number of interface pointers currently dependent upon the object.

RefCount defines the lifetime of the object. When RefCount is zero, the object is destroyed.

RefCount is incremented by calls to the _AddRef method and decremented by the _Release method.

Note: If the destructor is called on a TInterfacedObject descendant that is not fully constructed (an exception was raised in the constructor), RefCount will have a value of 1. Otherwise, RefCount will be zero.
Personal tools
In Other Languages
Previous Versions
Assistance