diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-11-16 14:47:14 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-11-16 15:07:11 +0300 |
commit | c7a1e115b5071ae55db4aa66085d19c183ea325d (patch) | |
tree | 5f9bbfae380c11cb13ebe50f178bd7de782d3159 /source/blender/blenkernel | |
parent | faa8aa3bb98431c6e71f1d5bd96df51b9ec30243 (diff) |
Tests: fix memory leak of GHOST system paths
Dispose of GHOST system paths when tearing down `BlendfileLoadingBaseTest`
and some other test cases. This prevents a memory leak.
A better solution would be to rework Blender's initialisation & teardown
structure, but that's outside the scope of this fix.
No functional changes to Blender.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/layer_test.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer_test.cc b/source/blender/blenkernel/intern/layer_test.cc index b5f800dd181..c8e5de75bfa 100644 --- a/source/blender/blenkernel/intern/layer_test.cc +++ b/source/blender/blenkernel/intern/layer_test.cc @@ -33,6 +33,8 @@ #include "RNA_access.h" +#include "GHOST_Path-api.h" + namespace blender::bke::tests { TEST(view_layer, aov_unique_names) @@ -94,6 +96,7 @@ TEST(view_layer, aov_unique_names) IMB_exit(); BKE_appdir_exit(); CLG_exit(); + GHOST_DisposeSystemPaths(); } static void test_render_pass_conflict(Scene *scene, @@ -173,6 +176,7 @@ TEST(view_layer, aov_conflict) IMB_exit(); BKE_appdir_exit(); CLG_exit(); + GHOST_DisposeSystemPaths(); } } // namespace blender::bke::tests |