1 #ifndef CAL_REF_COUNTED_H
2 #define CAL_REF_COUNTED_H
5 #include "cal3d/platform.h"
30 template<
typename T>
friend T* explicitIncRef(T* p);
48 assert(m_refCount == 0 &&
"_refCount nonzero in destructor");
55 assert(m_refCount >= 0 &&
"_refCount is less than zero in incRef()!");
65 assert(m_refCount > 0 &&
66 "_refCount is less than or equal to zero in decRef()!");
67 if (--m_refCount == 0)
74 int getRefCount()
const
83 RefCounted(
const RefCounted& rhs);
84 RefCounted& operator=(
const RefCounted& rhs);
91 T* explicitIncRef(T* p)
97 inline void explicitDecRef(RefCounted* p)