Defined in:Objects inherit from the
Sharedclass when they contain shared data and need to be reference counted.
||Returns an object's current reference count.|
||Increments an object's reference count.|
||Decrements an object's reference count.|
Sharedclass encapsulates a reference count for objects that can be shared. Upon construction, the object's reference count is initialized to 1.
IMPORTANT. The destructor of the
Sharedclass does not have public access, and the destructors of any subclasses of the
Sharedclass should not have public access. Shared objects must be released by calling the