Commit 5a309e8f authored by Ilya Lavrenov's avatar Ilya Lavrenov

fft cleanup ignoring

parent fa11f04a
...@@ -133,16 +133,21 @@ void cv::ocl::fft_setup() ...@@ -133,16 +133,21 @@ void cv::ocl::fft_setup()
void cv::ocl::fft_teardown() void cv::ocl::fft_teardown()
{ {
PlanCache& pCache = *PlanCache::getPlanCache(); PlanCache& pCache = *PlanCache::getPlanCache();
if(!pCache.started) if(!pCache.started)
{
return; return;
}
for(size_t i = 0; i < pCache.planStore.size(); i ++) for(size_t i = 0; i < pCache.planStore.size(); i ++)
{
delete pCache.planStore[i]; delete pCache.planStore[i];
}
pCache.planStore.clear(); pCache.planStore.clear();
openCLSafeCall( clAmdFftTeardown( ) );
try
{
openCLSafeCall( clAmdFftTeardown( ) );
}
catch (const std::bad_alloc &)
{ }
delete pCache.setupData; pCache.setupData = NULL; delete pCache.setupData; pCache.setupData = NULL;
pCache.started = false; pCache.started = false;
} }
......
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