diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-07 05:30:45 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-07 05:30:45 +0300 |
commit | 83c0f6ac3740cc8d7fb17a8b837ac95a8956805c (patch) | |
tree | cf069a3afc487a3067eb53e31698fe1e0df04f87 /source/blender/python/intern/bpy_interface.c | |
parent | 5c790fd52b6b5c9ebd28c8eaac49a2ba6d7e9a7a (diff) |
Python: clear Py-driver variables on exit
These kinds of leaks are relatively harmless, it reduces the number of
un-freed data reported by valgrind on exit.
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index ea64fa6c098..939fa475344 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -512,6 +512,9 @@ void BPY_python_end(void) /* finalizing, no need to grab the state, except when we are a module */ gilstate = PyGILState_Ensure(); + /* Frees the python-driver name-space & cached data. */ + BPY_driver_exit(); + /* Clear Python values in the context so freeing the context after Python exits doesn't crash. */ bpy_context_end(BPY_context_get()); |