C4 Engine
C4 Engine API Documentation

class Shared

Defined in:  TSTools.h
Objects inherit from the Shared class when they contain shared data and need to be reference counted.
Definition

class Shared

Member Functions
Shared::GetReferenceCount Returns an object's current reference count.
Shared::Retain Increments an object's reference count.
Shared::Release Decrements an object's reference count.
Constructor

Shared();

Description
The Shared class 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 Shared class does not have public access, and the destructors of any subclasses of the Shared class should not have public access. Shared objects must be released by calling the Shared::Release function.
See Also

AutoRelease