Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c7
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 c54c78ae389..64e992bd76f 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -442,6 +442,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)