diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-20 08:08:27 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-08-23 10:05:20 +0300 |
commit | 1e736d8a95b2e96e4a4f072f75711ab9522ea0e7 (patch) | |
tree | e7034f3dd9bbbb28eb08cd50e9a7fb14cc2950c5 /source/blender/blenkernel | |
parent | afde98a8268d4d823b9754d4161c2be5eb171de4 (diff) |
Cleanup: rename BKE_mesh_free -> BKE_mesh_free_data
It wasn't obvious this didn't free the memory of the mesh it's self
leading to memory leaks.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 22ce197088a..edf68f2b16f 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -95,7 +95,7 @@ void BKE_mesh_looptri_get_real_edges(const struct Mesh *mesh, const struct MLoopTri *looptri, int r_edges[3]); -void BKE_mesh_free(struct Mesh *me); +void BKE_mesh_free_data(struct Mesh *me); void BKE_mesh_clear_geometry(struct Mesh *me); struct Mesh *BKE_mesh_add(struct Main *bmain, const char *name); void BKE_mesh_copy_settings(struct Mesh *me_dst, const struct Mesh *me_src); diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index d5270f9e347..09efc1e0379 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -793,7 +793,7 @@ bool BKE_mesh_has_custom_loop_normals(Mesh *me) } /** Free (or release) any data used by this mesh (does not free the mesh itself). */ -void BKE_mesh_free(Mesh *me) +void BKE_mesh_free_data(Mesh *me) { mesh_free_data(&me->id); } @@ -987,7 +987,7 @@ void BKE_mesh_eval_delete(struct Mesh *mesh_eval) { /* Evaluated mesh may point to edit mesh, but never owns it. */ mesh_eval->edit_mesh = NULL; - BKE_mesh_free(mesh_eval); + BKE_mesh_free_data(mesh_eval); BKE_libblock_free_data(&mesh_eval->id, false); MEM_freeN(mesh_eval); } |