Browse Source

added gcDebugOn

Darren Ranalli 19 years ago
parent
commit
6fc09c4fd7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      direct/src/showbase/PythonUtil.py

+ 4 - 0
direct/src/showbase/PythonUtil.py

@@ -1919,6 +1919,10 @@ def printListEnum(l):
     for i in range(len(l)):
     for i in range(len(l)):
         print format % (i, l[i])
         print format % (i, l[i])
 
 
+def gcDebugOn():
+    import gc
+    return (gc.get_debug() & gc.DEBUG_LEAK) == gc.DEBUG_LEAK
+
 import __builtin__
 import __builtin__
 __builtin__.Functor = Functor
 __builtin__.Functor = Functor
 __builtin__.Stack = Stack
 __builtin__.Stack = Stack