PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...
#include "pandabase.h"
#include "weakReferenceList.h"
#include "typedObject.h"
#include "memoryUsage.h"
#include "memoryBase.h"
#include "config_express.h"
#include "atomicAdjust.h"
#include "numeric_types.h"
#include "deletedChain.h"
#include <stdlib.h>
#include "referenceCount.I"
Go to the source code of this file.
Classes | |
class | RefCountObj< Base > |
Another kind of proxy, similar to RefCountProxy. More... | |
class | RefCountProxy< Base > |
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. More... | |
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
All rights reserved.
All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."
Definition in file referenceCount.h.
|
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 329 of file referenceCount.I.
Referenced by GeomPrimitivePipelineReader::check_minmax(), RecorderTable::merge_from(), RecorderTable::remove_recorder(), GeomVertexArrayData::request_resident(), and DXGeomMunger9::wp_callback().