diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-28 06:59:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-28 06:59:24 +0300 |
commit | e6a5e33c09b5563405586c5e858534343f376181 (patch) | |
tree | 796990e822da6308163cff5ddf4ae7399d1e9ec4 /source/blender/python/intern | |
parent | 057859620d34b05bfe590620b9e770eccd36177a (diff) | |
parent | 87d3f4aff3225104cbb8be41ac0339c6a1cd9a85 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 830a809408b..c4789407e4e 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -450,6 +450,13 @@ void BPY_python_start(bContext *C, int argc, const char **argv) py_tstate = PyGILState_GetThisThreadState(); PyEval_ReleaseThread(py_tstate); #endif + +#ifdef WITH_PYTHON_MODULE + /* Disable all add-ons at exit, not essential, it just avoids resource leaks, see T71362. */ + BPY_run_string_eval(C, + (const char *[]){"atexit", "addon_utils", NULL}, + "atexit.register(addon_utils.disable_all)"); +#endif } void BPY_python_end(void) |