|
@@ -75,6 +75,8 @@ class ShowBase(DirectObject.DirectObject):
|
|
|
if logStackDump or uploadStackDump:
|
|
if logStackDump or uploadStackDump:
|
|
|
ExceptionVarDump.install(logStackDump, uploadStackDump)
|
|
ExceptionVarDump.install(logStackDump, uploadStackDump)
|
|
|
|
|
|
|
|
|
|
+ self.__autoGarbageLogging = self.__dev__ and self.config.GetBool('auto-garbage-logging', False)
|
|
|
|
|
+
|
|
|
## The directory containing the main Python file of this application.
|
|
## The directory containing the main Python file of this application.
|
|
|
self.mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")
|
|
self.mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")
|
|
|
|
|
|
|
@@ -2665,7 +2667,7 @@ class ShowBase(DirectObject.DirectObject):
|
|
|
if not properties.getOpen():
|
|
if not properties.getOpen():
|
|
|
# If the user closes the main window, we should exit.
|
|
# If the user closes the main window, we should exit.
|
|
|
self.notify.info("User closed main window.")
|
|
self.notify.info("User closed main window.")
|
|
|
- if __dev__ and config.GetBool('auto-garbage-logging', 0):
|
|
|
|
|
|
|
+ if self.__autoGarbageLogging:
|
|
|
GarbageReport.b_checkForGarbageLeaks()
|
|
GarbageReport.b_checkForGarbageLeaks()
|
|
|
self.userExit()
|
|
self.userExit()
|
|
|
|
|
|
|
@@ -2673,7 +2675,7 @@ class ShowBase(DirectObject.DirectObject):
|
|
|
self.mainWinForeground = 1
|
|
self.mainWinForeground = 1
|
|
|
elif not properties.getForeground() and self.mainWinForeground:
|
|
elif not properties.getForeground() and self.mainWinForeground:
|
|
|
self.mainWinForeground = 0
|
|
self.mainWinForeground = 0
|
|
|
- if __dev__ and config.GetBool('auto-garbage-logging', 0):
|
|
|
|
|
|
|
+ if self.__autoGarbageLogging:
|
|
|
GarbageReport.b_checkForGarbageLeaks()
|
|
GarbageReport.b_checkForGarbageLeaks()
|
|
|
|
|
|
|
|
if properties.getMinimized() and not self.mainWinMinimized:
|
|
if properties.getMinimized() and not self.mainWinMinimized:
|