Go to the documentation of this file.
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();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things that want to be reference-counted.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
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,...
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...