opencv/modules/ocl
Tom Stellard 8f3b876ee6 ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction
ContextImpl::currentContext contains a reference to one of the
DeviceInfoImpl objects from:

static std::vector<DeviceInfoImpl> global_devices;

ContextImpl::currentContext is destroyed in the destructor
for the statically defined object __module, and relies on its
DeviceInfoImpl reference to query some hardware features while
being destroyed.

This means that we need to ensure that the global_devices vector is
destroyed affter __module, otherwise ContextImpl::currentContext's
DeviceInfoImpl reference will no longer be valid when __module is
destroyed.

Since these variables are all confined to a single compilation unit,
they will be destruct from bottom to top, so we need to make sure
that __module is the bottom definition so it can be destroyed first.
2014-10-14 20:54:13 -04:00
..
doc Revert "Merge pull request #1779 from perping:integral_2.4" 2014-03-28 16:05:04 +04:00
include/opencv2/ocl ocl: fix mac and superres test 2014-07-02 11:54:20 +04:00
perf ocl: fix pyrUp perf test 2014-07-30 13:27:36 +04:00
src ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction 2014-10-14 20:54:13 -04:00
test Revert "Merge pull request #1779 from perping:integral_2.4" 2014-03-28 16:05:04 +04:00
CMakeLists.txt ocl: add support for initialization from user-provided OpenCL handles 2013-12-12 19:59:22 +04:00