Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/depsgraph/intern/depsnode.cc')
-rw-r--r--source/blender/depsgraph/intern/depsnode.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/depsnode.cc b/source/blender/depsgraph/intern/depsnode.cc
index 7d4d6890c83..8aa1059d2dc 100644
--- a/source/blender/depsgraph/intern/depsnode.cc
+++ b/source/blender/depsgraph/intern/depsnode.cc
@@ -71,21 +71,16 @@ DepsNode::DepsNode()
DepsNode::~DepsNode()
{
- /* free links
- * note: deleting relations will remove them from the node relations set,
- * but only touch the same position as we are using here, which is safe.
+ /* Free links. */
+ /* NOTE: We only free incoming links. This is to avoid double-free of links
+ * when we're trying to free same link from both it's sides. We don't have
+ * dangling links so this is not a problem from memory leaks point of view.
*/
DEPSNODE_RELATIONS_ITER_BEGIN(this->inlinks, rel)
{
OBJECT_GUARDED_DELETE(rel, DepsRelation);
}
DEPSNODE_RELATIONS_ITER_END;
-
- DEPSNODE_RELATIONS_ITER_BEGIN(this->outlinks, rel)
- {
- OBJECT_GUARDED_DELETE(rel, DepsRelation);
- }
- DEPSNODE_RELATIONS_ITER_END;
}