[Bf-blender-cvs] [2120acb73e4] master: Fix T80774: Leaks reported using '--version' command line argument
Campbell Barton
noreply at git.blender.org
Tue Sep 15 04:48:25 CEST 2020
Commit: 2120acb73e4a76543d83247ed45c95990d705d64
Author: Campbell Barton
Date: Tue Sep 15 12:45:03 2020 +1000
Branches: master
https://developer.blender.org/rB2120acb73e4a76543d83247ed45c95990d705d64
Fix T80774: Leaks reported using '--version' command line argument
Caused by 236ca8fbe8457550.
===================================================================
M source/creator/creator.c
===================================================================
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 37fbf0cf76a..68753366c7d 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -297,7 +297,6 @@ int main(int argc,
break;
}
}
- MEM_init_memleak_detection();
}
#ifdef BUILD_DATE
@@ -500,6 +499,10 @@ int main(int argc,
callback_main_atexit(&app_init_data);
BKE_blender_atexit_unregister(callback_main_atexit, &app_init_data);
+ /* Initialize memory leak detection after parsing command line arguments
+ * so arguments that call #exit (such as '--version' & '--help') don't report leaks. */
+ MEM_init_memleak_detection();
+
/* Paranoid, avoid accidental re-use. */
#ifndef WITH_PYTHON_MODULE
ba = NULL;
More information about the Bf-blender-cvs
mailing list