23 INLINE NodeCachedReferenceCount::
24 NodeCachedReferenceCount() {
36 INLINE NodeCachedReferenceCount::
50 INLINE
void NodeCachedReferenceCount::
58 nassertv(_node_ref_count != -100);
60 CachedTypedWritableReferenceCount::operator = (copy);
70 INLINE NodeCachedReferenceCount::
71 ~NodeCachedReferenceCount() {
78 nassertv(_node_ref_count != -100);
82 nassertv(_node_ref_count >= 0);
93 nassertv(_node_ref_count == 0);
99 _node_ref_count = -100;
152 return do_test_ref_count_integrity();
184 INLINE
void NodeCachedReferenceCount::
185 node_unref_only()
const {
193 nassertv(_node_ref_count > 0);
This class further specializes CachedTypedWritableReferenceCount to also add a node_ref_count,...
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
void node_ref() const
Explicitly increments the reference count.
static void inc(Integer &var)
Atomically increments the indicated variable.
static bool dec(Integer &var)
Atomically decrements the indicated variable and returns true if the new value is nonzero,...
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
bool node_unref() const
Explicitly decrements the node reference count and the normal reference count simultaneously.
void ref() const
Explicitly increments the reference count.
get_cache_ref_count
Returns the current reference count.
int get_node_ref_count() const
Returns the current reference count.
int get_referenced_bits() const
Returns the union of the values defined in the Referenced enum that represents the various things tha...
virtual bool unref() const
Explicitly decrements the reference count.