diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-24 13:26:11 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-24 13:26:11 +0300 |
commit | 236ca8fbe84575504f6ae80aec63c8059b875ef0 (patch) | |
tree | 5a889765ba6363b99b1d27231594592013f3263f /source/blender/makesdna | |
parent | 38863924305367eaae65d9447f8a306b86d6ea44 (diff) |
Allocator: make leak detection work with static variables
When definining static variables that own memory, you should
use the "construct on first use" idiom. Otherwise, you'll get
a warning when Blender exits.
More details are provided in D8354.
Differential Revision: https://developer.blender.org/D8354
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/intern/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 0f2761e311e..737ea9a7e12 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -40,6 +40,7 @@ set(SRC ../../blenlib/intern/BLI_memarena.c ../../blenlib/intern/BLI_mempool.c ../../blenlib/intern/hash_mm2a.c # needed by 'BLI_ghash_utils.c', not used directly. + ../../../../intern/guardedalloc/intern/leak_detector.cc ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mallocn_guarded_impl.c ../../../../intern/guardedalloc/intern/mallocn_lockfree_impl.c |