[Bf-blender-cvs] [5461c7526ab] master: Depsgraph: Fix memory leak
Jacques Lucke
noreply at git.blender.org
Wed May 6 14:01:53 CEST 2020
Commit: 5461c7526abdd38318d097986220d7006fe5e586
Author: Jacques Lucke
Date: Wed May 6 14:01:44 2020 +0200
Branches: master
https://developer.blender.org/rB5461c7526abdd38318d097986220d7006fe5e586
Depsgraph: Fix memory leak
I introduced the issue in rBb21a3e77027.
===================================================================
M source/blender/depsgraph/intern/depsgraph_physics.cc
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list