Browse Source

only detect DirectObject leaks in __dev__

Darren Ranalli 17 years ago
parent
commit
3cfc2b6427
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showbase/DirectObject.py

+ 3 - 0
direct/src/showbase/DirectObject.py

@@ -83,6 +83,9 @@ class DirectObject:
         del self._taskList[task.id]        
         del self._taskList[task.id]        
         
         
     def detectLeaks(self):
     def detectLeaks(self):
+        if not __dev__:
+            return
+        
         # call this after the DirectObject instance has been destroyed
         # call this after the DirectObject instance has been destroyed
         # if it's leaking, will notify user
         # if it's leaking, will notify user