14 #ifndef NODEREFERENCECOUNT_H
15 #define NODEREFERENCECOUNT_H
41 INLINE
int get_node_ref_count()
const;
42 INLINE
void node_ref()
const;
43 INLINE
bool node_unref()
const;
45 INLINE
void node_unref_only()
const;
48 bool do_test_ref_count_integrity()
const;
51 mutable AtomicAdjust::Integer _node_ref_count;
58 static void init_type() {
59 ReferenceCount::init_type();
61 ReferenceCount::get_class_type());
68 template<
class RefCountType>
85 static void init_type();
This works like RefCountObj, but it inherits from NodeReferenceCount instead of ReferenceCount.
This class specializes ReferenceCount to add an additional counter, called node_ref_count,...
A base class for all things that want to be reference-counted.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void node_unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...