diff --git a/direct/src/showbase/GarbageReport.py b/direct/src/showbase/GarbageReport.py index d9e302c108..eea470715a 100755 --- a/direct/src/showbase/GarbageReport.py +++ b/direct/src/showbase/GarbageReport.py @@ -537,7 +537,7 @@ class _CFGLGlobals: def checkForGarbageLeaks(): gc.collect() numGarbage = len(gc.garbage) - if (numGarbage > 0 and (not configIsToday('disable-garbage-logging'))): + if (numGarbage > 0 and (not config.GetBool('disable-garbage-logging', 1))): if (numGarbage != _CFGLGlobals.LastNumGarbage): print gr = GarbageReport('found garbage', threaded=False, collect=False) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 758b451963..b03b214e90 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -2190,7 +2190,7 @@ class ShowBase(DirectObject.DirectObject): if not properties.getOpen(): # If the user closes the main window, we should exit. self.notify.info("User closed main window.") - if __dev__: + if __dev__ and (not config.GetBool('disable-garbage-logging', 1)): GarbageReport.b_checkForGarbageLeaks() self.userExit() @@ -2198,7 +2198,7 @@ class ShowBase(DirectObject.DirectObject): self.mainWinForeground = 1 elif not properties.getForeground() and self.mainWinForeground: self.mainWinForeground = 0 - if __dev__: + if __dev__ and (not config.GetBool('disable-garbage-logging', 1)): GarbageReport.b_checkForGarbageLeaks() if properties.getMinimized() and not self.mainWinMinimized: