System.Classes.TComponent._AddRef

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

function _AddRef: Integer; stdcall;

C++

int __stdcall _AddRef();

Properties

Type Visibility Source Unit Parent
function protected
System.Classes.pas
System.Classes.hpp
System.Classes TComponent

Description

Called when an application uses a component interface.

_AddRef is a basic implementation of the IInterface method, _AddRef.

Note: If the component is a wrapper for a COM object, _AddRef calls the _AddRef method of that COM object, and returns the resulting reference count.

In all other cases, _AddRef simply returns –1 and takes no action. This allows the component to implement interfaces where reference counting is not required. More sophisticated components should override _AddRef to implement reference counting.

See Also