projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
c820777
)
Merge pull request #1597 from alalek:ocl_fix_cleanup
author
Andrey Pavlenko
<andrey.pavlenko@itseez.com>
Thu, 10 Oct 2013 15:02:29 +0000
(19:02 +0400)
committer
OpenCV Buildbot
<buildbot@opencv.org>
Thu, 10 Oct 2013 15:02:29 +0000
(19:02 +0400)
modules/ocl/src/cl_context.cpp
patch
|
blob
|
history
diff --git
a/modules/ocl/src/cl_context.cpp
b/modules/ocl/src/cl_context.cpp
index
f8120a0
..
900a5eb
100644
(file)
--- a/
modules/ocl/src/cl_context.cpp
+++ b/
modules/ocl/src/cl_context.cpp
@@
-724,7
+724,14
@@
bool supportsFeature(FEATURE_TYPE featureType)
struct __Module
{
__Module() { /* moved to Context::getContext(): initializeOpenCLDevices(); */ }
- ~__Module() { ContextImpl::cleanupContext(); }
+ ~__Module()
+ {
+#if defined(WIN32) && defined(CVAPI_EXPORTS)
+ // nothing, see DllMain
+#else
+ ContextImpl::cleanupContext();
+#endif
+ }
};
static __Module __module;
@@
-742,6
+749,7
@@
BOOL WINAPI DllMain(HINSTANCE /*hInst*/, DWORD fdwReason, LPVOID lpReserved)
{
if (lpReserved != NULL) // called after ExitProcess() call
cv::ocl::__termination = true;
+ cv::ocl::ContextImpl::cleanupContext();
}
return TRUE;
}