diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 68753366c7d..d2bfcb64b53 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -297,6 +297,7 @@ int main(int argc, break; } } + MEM_init_memleak_detection(); } #ifdef BUILD_DATE @@ -399,6 +400,10 @@ int main(int argc, main_args_setup(C, ba); + /* Begin argument parsing, ignore leaks so arguments that call #exit + * (such as '--version' & '--help') don't report leaks. */ + MEM_use_memleak_detection(false); + BLI_argsParse(ba, 1, NULL, NULL); main_signal_setup(); @@ -499,9 +504,8 @@ 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(); + /* End argument parsing, allow memory leaks to be printed. */ + MEM_use_memleak_detection(true); /* Paranoid, avoid accidental re-use. */ #ifndef WITH_PYTHON_MODULE |