[Bf-blender-cvs] [9e2cd6b0778] master: Fix memory leak with building springs in the cloth simulator
Campbell Barton
noreply at git.blender.org
Fri Aug 20 08:00:51 CEST 2021
Commit: 9e2cd6b07784e58f0e9b2ad6800f3ca8b54f9745
Author: Campbell Barton
Date: Fri Aug 20 15:57:50 2021 +1000
Branches: master
https://developer.blender.org/rB9e2cd6b07784e58f0e9b2ad6800f3ca8b54f9745
Fix memory leak with building springs in the cloth simulator
Error in 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
===================================================================
M source/blender/blenkernel/intern/cloth.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
===================================================================
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 9aa2d017c48..080a7c90c46 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -42,6 +42,7 @@
#include "BKE_cloth.h"
#include "BKE_effect.h"
#include "BKE_global.h"
+#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
@@ -1574,7 +1575,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
BLI_edgeset_free(existing_vert_pairs);
free_bvhtree_from_mesh(&treedata);
if (tmp_mesh) {
- BKE_mesh_free_data(tmp_mesh);
+ BKE_id_free(NULL, &tmp_mesh->id);
}
return false;
}
@@ -1583,7 +1584,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
BLI_edgeset_free(existing_vert_pairs);
free_bvhtree_from_mesh(&treedata);
if (tmp_mesh) {
- BKE_mesh_free_data(tmp_mesh);
+ BKE_id_free(NULL, &tmp_mesh->id);
}
BLI_rng_free(rng);
}
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 564a3c526f4..e6b1012c981 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -1649,6 +1649,7 @@ static int lineart_edge_type_duplication_count(char eflag)
}
static void lineart_geometry_object_load(LineartObjectInfo *obi, LineartRenderBuffer *rb)
{
+ printf("========================================================\nTESTING\n");
BMesh *bm;
BMVert *v;
BMFace *f;
More information about the Bf-blender-cvs
mailing list