Browse Source

oops! plug major memory leak

David Rose 24 years ago
parent
commit
7ccc77532b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/graph/nodeRelation.cxx

+ 3 - 3
panda/src/graph/nodeRelation.cxx

@@ -438,7 +438,7 @@ unref_parent() {
   if (_parent_ref == 0 && _attached) {
     // If we are the last to request a reference count on the parent,
     // actually decrement it now.
-    _parent->unref();
+    unref_delete(_parent);
   }
 }
 
@@ -684,7 +684,7 @@ attach() {
 //               when its last reference count is removed, and it is
 //               generally a bad idea to destruct a class within its
 //               own method.
-
+//
 //               It must be a PT(TypedWritableReferenceCount), and
 //               not PT_NodeRelation, because of circularity problems
 //               trying to export the template class PT_NodeRelation.
@@ -718,7 +718,7 @@ detach() {
 
   _attached = false;
   if (_parent_ref != 0) {
-    _parent->unref();
+    unref_delete(_parent);
   }
 
   // Blow out the cache and increment the current update sequence.