5 #ifndef __I_IREFERENCE_COUNTED_H_INCLUDED__ 6 #define __I_IREFERENCE_COUNTED_H_INCLUDED__ 10 #ifdef _IRR_COMPILE_WITH_LEAK_HUNTER_ 51 : DebugName(0), ReferenceCounter(1)
53 #ifdef _IRR_COMPILE_WITH_LEAK_HUNTER_ 54 LeakHunter::addObject(
this);
61 #ifdef _IRR_COMPILE_WITH_LEAK_HUNTER_ 62 LeakHunter::removeObject(
this);
96 void grab()
const { ++ReferenceCounter; }
132 if (!ReferenceCounter)
145 return ReferenceCounter;
174 mutable s32 ReferenceCounter;
bool drop() const
Drops the object. Decrements the reference counter by one.
virtual ~IReferenceCounted()
Destructor.
char c8
8 bit character variable.
Everything in the Irrlicht Engine can be found in this namespace.
signed int s32
32 bit signed variable.
s32 getReferenceCount() const
Get the reference count.
IReferenceCounted()
Constructor.
#define _IRR_DEBUG_BREAK_IF(_CONDITION_)
define a break macro for debugging.
const c8 * getDebugName() const
Returns the debug name of the object.
void grab() const
Grabs the object. Increments the reference counter by one.
void setDebugName(const c8 *newName)
Sets the debug name of the object.
Base class of most objects of the Irrlicht Engine.