瀏覽代碼

ignoreAll in del

Dave Schuyler 20 年之前
父節點
當前提交
86faf19707
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      direct/src/showbase/DirectObject.py

+ 4 - 4
direct/src/showbase/DirectObject.py

@@ -8,10 +8,10 @@ class DirectObject:
     def __init__(self):
     def __init__(self):
         pass
         pass
 
 
-    # This destructor is useful for debugging leaks
-    #def __del__(self):
-    #    print "Destructing: ", self.__class__.__name__
-
+    def __del__(self):
+        self.ignoreAll()
+        # This next line is useful for debugging leaks
+        #print "Destructing: ", self.__class__.__name__
 
 
     # Wrapper functions to have a cleaner, more object oriented approach to
     # Wrapper functions to have a cleaner, more object oriented approach to
     # the messenger functionality.
     # the messenger functionality.