NodeReferenceCount¶
from panda3d.core import NodeReferenceCount
-
class
NodeReferenceCount
¶ Bases:
ReferenceCount
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.The new methods
nodeRef()
andnodeUnref()
automatically increment and decrement the primary reference count as well. There also exists a NodePointerTo<> class to maintain thenodeRef()
counters automatically.See also
CachedTypedWritableReferenceCount
, which is similar in principle, as well asNodeCachedReferenceCount
, which combines both of these.Inheritance diagram
-
static
getClassType
() → TypeHandle¶
-
nodeRef
()¶ Explicitly increments the node reference count and the normal reference count simultaneously.
-
nodeUnref
() → bool¶ Explicitly decrements the node reference count and the normal reference count simultaneously.
The return value is true if the new reference count is nonzero, false if it is zero.
-
nodeUnrefOnly
()¶ Decrements the node reference count without affecting the normal reference count. Intended to be called by derived classes only, presumably to reimplement
nodeUnref()
.
-
static