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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-18 12:10:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-18 12:10:49 +0300
commitd04eb330e873488d8b7cbe49da5600d6f64ea6db (patch)
tree28edd8c295c23452da6c5280f3a804ac09b78a0b /source/blender/imbuf/intern/openexr/openexr_api.cpp
parent8b41cd5b96ea50b41aea2072517bdfd95b58ac8d (diff)
Close OpenEXR thread pool on exit
This partially solves ASAN report about unfreed memory. There is still something in the report, need to have a closer look with debug version of OpenEXE library.
Diffstat (limited to 'source/blender/imbuf/intern/openexr/openexr_api.cpp')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index e8e6e0576ed..bad5e0efd65 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1921,4 +1921,12 @@ void imb_initopenexr(void)
setGlobalThreadCount(num_threads);
}
+void imb_exitopenexr(void)
+{
+ /* Tells OpenEXR to free thread pool, also ensures there is no running
+ * tasks.
+ */
+ setGlobalThreadCount(0);
+}
+
} // export "C"