[Bf-blender-cvs] [2aa0cbfd8d1] soc-2019-adaptive-cloth: Cloth: fix memory leak while removing vertex
ishbosamiya
noreply at git.blender.org
Tue Aug 6 20:32:57 CEST 2019
Commit: 2aa0cbfd8d11caeac25c2951eea6b33423977eaa
Author: ishbosamiya
Date: Tue Aug 6 18:19:57 2019 +0530
Branches: soc-2019-adaptive-cloth
https://developer.blender.org/rB2aa0cbfd8d11caeac25c2951eea6b33423977eaa
Cloth: fix memory leak while removing vertex
ClothSizing was not being freed when the vertex was removed, now it is.
===================================================================
M source/blender/blenkernel/intern/cloth_remeshing.cpp
===================================================================
diff --git a/source/blender/blenkernel/intern/cloth_remeshing.cpp b/source/blender/blenkernel/intern/cloth_remeshing.cpp
index e72044083ec..ba42985f36b 100644
--- a/source/blender/blenkernel/intern/cloth_remeshing.cpp
+++ b/source/blender/blenkernel/intern/cloth_remeshing.cpp
@@ -1319,7 +1319,9 @@ static bool cloth_remeshing_can_collapse_edge(ClothModifierData *clmd,
}
}
}
+#if COLLAPSE_EDGES_DEBUG
printf("sucessfully collapsed\n");
+#endif
return true;
}
@@ -1331,6 +1333,7 @@ static void cloth_remeshing_remove_vertex_from_cloth(BMVert *v, ClothVertMap &cv
cvm[v].x[1],
cvm[v].x[2]);
#endif
+ MEM_freeN(cvm[v].sizing);
cvm.erase(v);
}
More information about the Bf-blender-cvs
mailing list