20 _void_ptr = (
void *)ptr;
23 #ifdef DO_MEMORY_USAGE 35 _void_ptr = copy._void_ptr;
36 if (_void_ptr !=
nullptr) {
37 To *ptr = (To *)_void_ptr;
48 _void_ptr = from._void_ptr;
49 from._void_ptr =
nullptr;
61 To *ptr = (Y *)r._void_ptr;
63 this->_void_ptr = ptr;
64 r._void_ptr =
nullptr;
73 if (_void_ptr !=
nullptr) {
89 if (from._void_ptr != this->_void_ptr) {
90 To *old_ptr = (To *)this->_void_ptr;
92 this->_void_ptr = from._void_ptr;
93 from._void_ptr =
nullptr;
96 if (old_ptr !=
nullptr) {
110 if (from._void_ptr != this->_void_ptr) {
111 To *old_ptr = (To *)this->_void_ptr;
115 To *new_ptr = (Y *)from._void_ptr;
117 this->_void_ptr = new_ptr;
118 from._void_ptr =
nullptr;
121 if (old_ptr !=
nullptr) {
134 if (ptr != (To *)_void_ptr) {
139 To *old_ptr = (To *)_void_ptr;
141 _void_ptr = (
void *)ptr;
142 if (ptr !=
nullptr) {
144 #ifdef DO_MEMORY_USAGE 150 if (old_ptr !=
nullptr) {
162 if (copy._void_ptr != _void_ptr) {
167 To *old_ptr = (To *)_void_ptr;
168 To *new_ptr = (To *)copy._void_ptr;
170 _void_ptr = copy._void_ptr;
171 if (new_ptr !=
nullptr) {
176 if (old_ptr !=
nullptr) {
189 #ifdef DO_MEMORY_USAGE 192 if (type == TypeHandle::none()) {
194 type = get_type_handle(To);
196 if (type != TypeHandle::none()) {
200 #endif // DO_MEMORY_USAGE 221 if (_void_ptr !=
nullptr) {
222 out <<
":" << ((
To *)_void_ptr)->get_ref_count();
void clear()
A convenient way to set the PointerTo object to NULL.
This is the base class for PointerTo and ConstPointerTo.
void output(std::ostream &out) const
A handy function to output PointerTo's as a hex pointer followed by a reference count.
static void update_type(ReferenceCount *ptr, TypeHandle type)
Associates the indicated type with the given pointer.
A file that contains a set of files.
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 unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...