Merge pull request #1607 from ilya-lavrenov:ocl_fft_cleanup

pull/1608/merge
Andrey Pavlenko 11 years ago committed by OpenCV Buildbot
commit f9fe1b9b09
  1. 13
      modules/ocl/src/fft.cpp

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

Loading…
Cancel
Save