Commit: 1c1efe3ac605b187254377058c93fd34c94aaf9a
Author: Campbell Barton
Date:   Tue Mar 8 20:42:24 2022 +1100
Branches: master
https://developer.blender.org/rB1c1efe3ac605b187254377058c93fd34c94aaf9a

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 61bb183068d..e2b6b2bec29 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -401,6 +401,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