diff --git a/direct/src/showbase/DirectObject.py b/direct/src/showbase/DirectObject.py index c445099c7e..71a9b0c99f 100644 --- a/direct/src/showbase/DirectObject.py +++ b/direct/src/showbase/DirectObject.py @@ -83,6 +83,9 @@ class DirectObject: del self._taskList[task.id] def detectLeaks(self): + if not __dev__: + return + # call this after the DirectObject instance has been destroyed # if it's leaking, will notify user