Commit 4aa891e7 authored by Alexander Karsakov's avatar Alexander Karsakov

Remove clReleaseDevice call (workaround for pure virtual call on Windows)

parent ba451350
...@@ -596,9 +596,16 @@ protected: ...@@ -596,9 +596,16 @@ protected:
CV_Assert(this != currentContext); CV_Assert(this != currentContext);
#ifdef CL_VERSION_1_2 #ifdef CL_VERSION_1_2
if (supportsFeature(FEATURE_CL_VER_1_2)) #ifdef WIN32
// if process is on termination stage (ExitProcess was called and other threads were terminated)
// then disable command queue release because it may cause program hang
if (!__termination)
#endif
{ {
openCLSafeCall(clReleaseDevice(clDeviceID)); if (supportsFeature(FEATURE_CL_VER_1_2))
{
openCLSafeCall(clReleaseDevice(clDeviceID));
}
} }
#endif #endif
if (deviceInfoImpl._id < 0) // not in the global registry, so we should cleanup it if (deviceInfoImpl._id < 0) // not in the global registry, so we should cleanup it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment