diff options
author | Jacques Lucke <jacques@blender.org> | 2020-05-06 15:01:44 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-05-06 15:01:44 +0300 |
commit | 5461c7526abdd38318d097986220d7006fe5e586 (patch) | |
tree | a8ae292346c29a58c6d4b031f6f03db9b0ba8ddb | |
parent | 578e97671083455e271ac4dfff4e81fdd63ce1d5 (diff) |
Depsgraph: Fix memory leak
I introduced the issue in rBb21a3e77027.
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_physics.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_physics.cc b/source/blender/depsgraph/intern/depsgraph_physics.cc index 20375e447c3..97216df3cb1 100644 --- a/source/blender/depsgraph/intern/depsgraph_physics.cc +++ b/source/blender/depsgraph/intern/depsgraph_physics.cc @@ -203,7 +203,6 @@ void clear_physics_relations(Depsgraph *graph) for (ListBase *list : hash->values()) { BKE_effector_relations_free(list); } - hash->clear(); break; case DEG_PHYSICS_COLLISION: case DEG_PHYSICS_SMOKE_COLLISION: @@ -211,11 +210,11 @@ void clear_physics_relations(Depsgraph *graph) for (ListBase *list : hash->values()) { BKE_collision_relations_free(list); } - hash->clear(); break; case DEG_PHYSICS_RELATIONS_NUM: break; } + delete hash; graph->physics_relations[i] = nullptr; } } |