Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/express/referenceCount.h File Reference

#include <pandabase.h>
#include "typedObject.h"
#include "memoryUsage.h"
#include "config_express.h"
#include "atomicAdjust.h"
#include <stdlib.h>
#include "referenceCount.I"

Go to the source code of this file.

Compounds

class  RefCountObj
 Another kind of proxy, similar to RefCountProxy. More...

class  RefCountProxy
 A "proxy" to use to make a reference-countable object whenever the object cannot inherit from ReferenceCount for some reason. More...

class  ReferenceCount
 A base class for all things that want to be reference-counted. More...


Functions

template<class RefCountType> void unref_delete (RefCountType *ptr)
 This global helper function will unref the given ReferenceCount object, and if the reference count reaches zero, automatically delete it.


Detailed Description

Definition in file referenceCount.h.


Function Documentation

template<class RefCountType>
void unref_delete RefCountType *  ptr  )  [inline]
 

This global helper function will unref the given ReferenceCount object, and if the reference count reaches zero, automatically delete it.

It can't be a member function because it's usually a bad idea to delete an object from within its own member function. It's a template function so the destructor doesn't have to be virtual.

Definition at line 368 of file referenceCount.I.

References INLINE.

Referenced by TransformState::get_num_unused_states().


Generated on Fri May 2 00:45:34 2003 for Panda by doxygen1.3