Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-15 06:23:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-15 06:32:00 +0300
commit62f2925e438fae25f0dab615a7932774586669f3 (patch)
treedf2ba7195a0defc1fe35126b4f641832bbe96496 /source/creator
parent2120acb73e4a76543d83247ed45c95990d705d64 (diff)
Fix T80774: (correction) keep MEM_init_memleak_detection call early
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c10
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