RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLDocument._AddRef Method

Called when an application uses a component interface.

Pascal
function _AddRef: Integer; stdcall;
C++
__fastcall __stdcall int _AddRef();

__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. 

 

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