47 _void_ptr = from._void_ptr;
48 from._void_ptr =
nullptr;
60 To *old_ptr = (To *)this->_void_ptr;
62 this->_void_ptr = from._void_ptr;
63 from._void_ptr =
nullptr;
66 if (old_ptr !=
nullptr) {
78 if (ptr != (To *)_void_ptr) {
83 To *old_ptr = (To *)_void_ptr;
85 _void_ptr = (
void *)ptr;
88 #ifdef DO_MEMORY_USAGE 93 if (type == TypeHandle::none()) {
95 type = get_type_handle(To);
97 if (type != TypeHandle::none()) {
105 if (old_ptr !=
nullptr) {
117 reassign((To *)copy._void_ptr);
139 if (_void_ptr !=
nullptr) {
140 out <<
":" << ((To *)_void_ptr)->get_node_ref_count() <<
"/" 141 << ((To *)_void_ptr)->get_ref_count();
void clear()
A convenient way to set the NodePointerTo object to NULL.
This is similar to PointerToBase, but it manages objects of type NodeReferenceCount or NodeCachedRefe...
static void update_type(ReferenceCount *ptr, TypeHandle type)
Associates the indicated type with the given pointer.
void output(std::ostream &out) const
A handy function to output NodePointerTo's as a hex pointer followed by a reference count.
static bool get_track_memory_usage()
Returns true if the user has Configured the variable 'track-memory-usage' to true,...
TypeHandle is the identifier used to differentiate C++ class types.
void node_unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...