Browse Source

lock name, class inheritance

David Rose 18 years ago
parent
commit
a3585abfec
2 changed files with 8 additions and 3 deletions
  1. 5 2
      panda/src/gobj/geomVertexArrayData.I
  2. 3 1
      panda/src/gobj/geomVertexArrayData.h

+ 5 - 2
panda/src/gobj/geomVertexArrayData.I

@@ -251,7 +251,7 @@ set_lru_size(size_t lru_size) {
 INLINE GeomVertexArrayData::CData::
 CData() :
   _usage_hint(UH_unspecified),
-  _rw_lock("GeomVertexArrayData::CData::_wl_lock")
+  _rw_lock("GeomVertexArrayData::CData::_rw_lock")
 {
 }
 
@@ -265,7 +265,7 @@ CData(const GeomVertexArrayData::CData &copy) :
   _usage_hint(copy._usage_hint),
   _buffer(copy._buffer),
   _modified(copy._modified),
-  _rw_lock("GeomVertexArrayData::CData::_wl_lock")
+  _rw_lock("GeomVertexArrayData::CData::_rw_lock")
 {
 }
 
@@ -303,6 +303,9 @@ GeomVertexArrayDataHandle(const GeomVertexArrayData *object,
 #ifdef DO_PIPELINING
   _cdata->ref();
 #endif  // DO_PIPELINING
+#ifdef DO_MEMORY_USAGE
+  MemoryUsage::update_type(this, get_class_type());
+#endif
 }
 
 ////////////////////////////////////////////////////////////////////

+ 3 - 1
panda/src/gobj/geomVertexArrayData.h

@@ -301,7 +301,9 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    register_type(_type_handle, "GeomVertexArrayDataHandle");
+    ReferenceCount::init_type();
+    register_type(_type_handle, "GeomVertexArrayDataHandle",
+                  ReferenceCount::get_class_type());
   }
 
 private: