[Bf-blender-cvs] [ebbb55dd805] blender2.8: Depsgraph: Fix memory leak when datablock is not reused
Sergey Sharybin
noreply at git.blender.org
Tue Mar 20 16:07:40 CET 2018
Commit: ebbb55dd80531f1932b089d39f7350f265db7323
Author: Sergey Sharybin
Date: Tue Mar 20 16:06:21 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBebbb55dd80531f1932b089d39f7350f265db7323
Depsgraph: Fix memory leak when datablock is not reused
It is possible that datablock will not be re-used for the new
dependency graph building. Freeing function was freeing all
the nested pointers of databnlock, but not datablock memory
itself.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index bbf28a98aa2..80daa306bff 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -155,6 +155,7 @@ void free_copy_on_write_datablock(void *id_v)
{
ID *id = (ID *)id_v;
deg_free_copy_on_write_datablock(id);
+ MEM_freeN(id);
}
} /* namespace */
More information about the Bf-blender-cvs
mailing list