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.
Public Member Functions | |
---|---|
void | Close() |
TInt | IsShared() |
void | Open() |
Protected Member Functions | |
---|---|
~CIpsecReferenceCountObject() |
Protected Attributes | |
---|---|
TInt | iRefs |
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)
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.