diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-02 16:20:36 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-02 16:20:36 +0300 |
commit | 0b6fa1a0fbca496fe4163ee679a1faeb47a51441 (patch) | |
tree | 7c73c0a8fe7be08f28c856941031e9955fc9221c | |
parent | 7b1de2b407beb5f73e6d18b61a49c5b39ed05873 (diff) |
Mesh batch cache: fix memory leak
-rw-r--r-- | source/blender/blenkernel/intern/mesh_render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/mesh_render.c b/source/blender/blenkernel/intern/mesh_render.c index da88d35b986..5b8f70ce218 100644 --- a/source/blender/blenkernel/intern/mesh_render.c +++ b/source/blender/blenkernel/intern/mesh_render.c @@ -824,10 +824,10 @@ void BKE_mesh_batch_cache_clear(Mesh *me) if (cache->edges_in_order) ElementList_discard(cache->edges_in_order); if (cache->triangles_in_order) ElementList_discard(cache->triangles_in_order); - if (cache->overlay_triangles) Batch_discard(cache->overlay_triangles); - if (cache->overlay_loose_verts) Batch_discard(cache->overlay_loose_verts); - if (cache->overlay_loose_edges) Batch_discard(cache->overlay_loose_edges); - if (cache->overlay_facedots) Batch_discard(cache->overlay_facedots); + if (cache->overlay_triangles) Batch_discard_all(cache->overlay_triangles); + if (cache->overlay_loose_verts) Batch_discard_all(cache->overlay_loose_verts); + if (cache->overlay_loose_edges) Batch_discard_all(cache->overlay_loose_edges); + if (cache->overlay_facedots) Batch_discard_all(cache->overlay_facedots); if (cache->triangles_with_normals) { Batch_discard_all(cache->triangles_with_normals); |