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:
authorSybren A. Stüvel <sybren@blender.org>2021-11-16 14:47:14 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-11-16 15:07:11 +0300
commitc7a1e115b5071ae55db4aa66085d19c183ea325d (patch)
tree5f9bbfae380c11cb13ebe50f178bd7de782d3159 /source/blender/blenloader
parentfaa8aa3bb98431c6e71f1d5bd96df51b9ec30243 (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/blenloader')
-rw-r--r--source/blender/blenloader/CMakeLists.txt1
-rw-r--r--source/blender/blenloader/tests/blendfile_loading_base_test.cc3
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 89631588ed0..b3df5c8aa67 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -34,6 +34,7 @@ set(INC
../sequencer
../windowmanager
../../../intern/clog
+ ../../../intern/ghost
../../../intern/guardedalloc
# for writefile.c: dna_type_offsets.h
diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
index 8afa631ffc5..21156868655 100644
--- a/source/blender/blenloader/tests/blendfile_loading_base_test.cc
+++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
@@ -48,6 +48,8 @@
#include "WM_api.h"
#include "wm.h"
+#include "GHOST_Path-api.h"
+
#include "CLG_log.h"
void BlendfileLoadingBaseTest::SetUpTestCase()
@@ -93,6 +95,7 @@ void BlendfileLoadingBaseTest::TearDownTestCase()
RNA_exit();
DEG_free_node_types();
+ GHOST_DisposeSystemPaths();
DNA_sdna_current_free();
BLI_threadapi_exit();