CIpsecReferenceCountObject Class Reference

class CIpsecReferenceCountObject : public CBase

The base class for all IPSEC reference count objects.

Many IPSEC objects are implemented as "reference counted objects" which automaticly delete self, when the last reference is removed.

The contruction of the object is counted as one reference. The Open() and Close() methods are not supposed to be overridden, and are not defined "virtual". This base class attempts to be as light as possible

The destructor is virtual and private. The reference counted objects are never deleted from outside, only from the Close() method.

Inherits from

  • CIpsecReferenceCountObject

Constructor & Destructor Documentation

~CIpsecReferenceCountObject()

~CIpsecReferenceCountObject()[protected, inline, virtual]

Member Functions Documentation

Close()

voidClose()

Decrement reference count and destroy object after last reference.

IsShared()

TInt IsShared()const [inline]

Return the current reference count.

The reference count works as implicit flag to test whether object has more than one reference to it (is shared).

  • = 0, only one reference exist (not shared)

  • > 0, other references exist (object is shared)

Open()

voidOpen()[inline]

Increment reference count.

Records an additional reference to the object.

Member Data Documentation

TInt iRefs

TInt iRefs[protected]