Fix memory leak with building springs in the cloth simulator
Error in 2788b0261c
.
This commit is contained in:
parent
63559a779c
commit
20f04ce62a
Notes:
blender-bot
2023-02-14 08:29:54 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
|
@ -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"
|
||||
|
@ -1575,7 +1576,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(tmp_mesh);
|
||||
BKE_id_free(NULL, &tmp_mesh->id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1584,7 +1585,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(tmp_mesh);
|
||||
BKE_id_free(NULL, &tmp_mesh->id);
|
||||
}
|
||||
BLI_rng_free(rng);
|
||||
}
|
||||
|
|
|
@ -1471,6 +1471,7 @@ static void lineart_geometry_object_load(Depsgraph *dg,
|
|||
int override_usage,
|
||||
int *global_vindex)
|
||||
{
|
||||
printf("========================================================\nTESTING\n");
|
||||
BMesh *bm;
|
||||
BMVert *v;
|
||||
BMFace *f;
|
||||
|
|
Loading…
Reference in New Issue