RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TLayoutWebContent._AddRef Method

Responds when the caller acquires a reference to this object's interface.

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

In Delphi, when an application uses an interface that is implemented by TLayoutWebContent or one of its descendants, it automatically calls __AddRef. Typically, interfaced objects use the __AddRef method to increment a reference count, which is then decremented when the application releases the interface. In this typical scenario, when the reference count drops to zero, the object frees itself. 

TLayoutWebContent implements its own version of the interface methods __AddRef and _Release that avoid this typical behavior. This prevents the object from being freed when its reference count drops to zero. In TLayoutWebContent, __AddRef always returns –1. 

 

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