A reference counting object is one which uses reference counting to track concurrent references to itself and which arranges for automatic destruction of itself when the final reference is removed. It is also an object which can be named.
A reference counting object is any object which has CObject as its base class.
Constructing a CObject derived type, or calling its CObject::Open() member function, adds a reference to that object by adding one to its reference count. Calling its CObject::Close() member function removes a reference by subtracting one from its reference count. When the last user of the object calls CObject::Close() , the reference count becomes zero and the object is automatically destroyed.
The following drawing shows the idea.
The server side implementation of a client/server subsession uses a CObject .
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.