Panda3D
Classes | Functions
nodeReferenceCount.h File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "pandabase.h"
#include "referenceCount.h"
#include "nodeReferenceCount.I"

Go to the source code of this file.

Classes

class  NodeRefCountObj< Base >
 This works like RefCountObj, but it inherits from NodeReferenceCount instead of ReferenceCount. More...
 
class  NodeReferenceCount
 This class specializes ReferenceCount to add an additional counter, called node_ref_count, for the purposes of counting the number of times the object is referenced by a "node", whatever that may mean in context. More...
 

Functions

template<class RefCountType >
void node_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...
 

Detailed Description

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."

Author
drose
Date
2006-05-01

Definition in file nodeReferenceCount.h.

Function Documentation

◆ node_unref_delete()

template<class RefCountType >
void node_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 185 of file nodeReferenceCount.I.

Referenced by PandaNodePipelineReader::check_cached().