Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts: cmake/OpenCVDetectPython.cmake cmake/OpenCVModule.cmake modules/core/src/gpumat.cpp modules/cudaimgproc/test/test_hough.cpp modules/gpu/CMakeLists.txt modules/gpu/src/cuda/generalized_hough.cu modules/gpu/src/generalized_hough.cpp modules/python/CMakeLists.txt
This commit is contained in:
@@ -999,17 +999,24 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
static TLSContainerStorage tlsContainerStorage;
|
||||
|
||||
// This is a wrapper function that will ensure 'tlsContainerStorage' is constructed on first use.
|
||||
// For more information: http://www.parashift.com/c++-faq/static-init-order-on-first-use.html
|
||||
static TLSContainerStorage& getTLSContainerStorage()
|
||||
{
|
||||
static TLSContainerStorage *tlsContainerStorage = new TLSContainerStorage();
|
||||
return *tlsContainerStorage;
|
||||
}
|
||||
|
||||
TLSDataContainer::TLSDataContainer()
|
||||
: key_(-1)
|
||||
{
|
||||
key_ = tlsContainerStorage.allocateKey(this);
|
||||
key_ = getTLSContainerStorage().allocateKey(this);
|
||||
}
|
||||
|
||||
TLSDataContainer::~TLSDataContainer()
|
||||
{
|
||||
tlsContainerStorage.releaseKey(key_, this);
|
||||
getTLSContainerStorage().releaseKey(key_, this);
|
||||
key_ = -1;
|
||||
}
|
||||
|
||||
@@ -1034,7 +1041,7 @@ TLSStorage::~TLSStorage()
|
||||
void*& data = tlsData_[i];
|
||||
if (data)
|
||||
{
|
||||
tlsContainerStorage.destroyData(i, data);
|
||||
getTLSContainerStorage().destroyData(i, data);
|
||||
data = NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user