#include <ReferenceCount.h>
List of all members.
[inline]
Allow silent cast to the base class.
SubRef s = new Sub(); BaseRef b = s;
i.e., compile-time subtyping rule RCP<T> <: RCP<S> if T <: S
Allows construction from a raw pointer. That object will thereafter be reference counted -- do not call delete on it.
Explicit cast to a subclass. Acts like dynamic cast; the result will be NULL if the cast cannot succeed. Not supported on VC6.
SubRef s = new Sub(); BaseRef b = s; s = b.downcast<Sub>(); // Note that the template argument is the object type, not the pointer type.
Returns true if this is the last reference to an object. Useful for flushing memoization caches-- a cache that holds the last reference is unnecessarily keeping an object alive.
Not threadsafe.