Commit: eff7e9aa45af32b7de7893c43aa14c933c9d270c
Author: Campbell Barton
Date:   Tue Mar 8 20:42:24 2022 +1100
Branches: blender-v3.1-release
https://developer.blender.org/rBeff7e9aa45af32b7de7893c43aa14c933c9d270c

Fix memory leak evaluating PyDrivers

Missed decref in 686ab4c9401a90b22fb17e46c992eb513fe4f693 caused every
driver evaluation to create the BPy_StructRNA depsgraph without freeing
the previously allocated depsgraph.

===================================================================

M       source/blender/python/intern/bpy_driver.c

===================================================================

diff --git a/source/blender/python/intern/bpy_driver.c 
b/source/blender/python/intern/bpy_driver.c
index bd1f3cd301f..440cf533f73 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -415,6 +415,7 @@ static void bpy_pydriver_namespace_add_depsgraph(PyObject 
*driver_vars,
     PyErr_Print();
     PyErr_Clear();
   }
+  Py_DECREF(py_depsgraph);
 }
 
 float BPY_driver_exec(struct PathResolvedRNA *anim_rna,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to