1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #12791 from alalek:win32_dllmain_detect_termination

This commit is contained in:
Alexander Alekhin
2018-10-11 19:28:29 +00:00
4 changed files with 51 additions and 2 deletions
+4
View File
@@ -4779,6 +4779,10 @@ public:
void deallocate_(UMatData* u) const
{
#ifdef _WIN32
if (cv::__termination) // process is not in consistent state (after ExitProcess call) and terminating
return; // avoid any OpenCL calls
#endif
if(u->tempUMat())
{
CV_Assert(u->origdata);
+3 -2
View File
@@ -308,8 +308,9 @@ TLSData<CoreTLSData>& getCoreTlsData();
#define CL_RUNTIME_EXPORT
#endif
extern bool __termination; // skip some cleanups, because process is terminating
// (for example, if ExitProcess() was already called)
extern CV_EXPORTS
bool __termination; // skip some cleanups, because process is terminating
// (for example, if ExitProcess() was already called)
cv::Mutex& getInitializationMutex();