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.
This commit is contained in:
2022-07-07 12:30:45 +10:00
parent 5c790fd52b
commit 83c0f6ac37
3 changed files with 22 additions and 8 deletions

View File

@@ -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());