Fix (unreported) memleak in some BKE tests in multi-binaries case.
Some tests would access system paths somehow, which implicitely creates the static `m_systemPaths` variable, but would not explicitely call `GHOST_DisposeSystemPaths` at the end to release it. Noticeable when disabling the `WITH_TESTS_SINGLE_BINARY` option.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "GHOST_Path-api.hh"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_global.hh"
|
||||
#include "BKE_idtype.hh"
|
||||
@@ -80,6 +82,7 @@ class ImagePartialUpdateTest : public testing::Test {
|
||||
|
||||
IMB_moviecache_destruct();
|
||||
IMB_exit();
|
||||
GHOST_DisposeSystemPaths();
|
||||
BKE_appdir_exit();
|
||||
CLG_exit();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "GHOST_Path-api.hh"
|
||||
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
@@ -140,6 +142,7 @@ template<typename TestData> class Context {
|
||||
bke::BKE_node_system_exit();
|
||||
RNA_exit();
|
||||
IMB_exit();
|
||||
GHOST_DisposeSystemPaths();
|
||||
BKE_appdir_exit();
|
||||
CLG_exit();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "GHOST_Path-api.hh"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
@@ -149,6 +151,7 @@ template<typename TestData> class Context {
|
||||
RNA_exit();
|
||||
IMB_exit();
|
||||
BKE_appdir_exit();
|
||||
GHOST_DisposeSystemPaths();
|
||||
CLG_exit();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user