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

@@ -69,6 +69,11 @@ void BPY_modules_load_user(struct bContext *C);
void BPY_app_handlers_reset(bool do_all);
/**
* Run on exit to free any cached data.
*/
void BPY_driver_exit(void);
/**
* Update function, it gets rid of python-drivers global dictionary: `bpy.app.driver_namespace`,
* forcing #BPY_driver_exec to recreate it. Use this when loading a new `.blend` file