fft cleanup ignoring

This commit is contained in:
Ilya Lavrenov 2013-10-11 20:24:26 +04:00
parent fa11f04ae1
commit 5a309e8f6e

View File

@ -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();
openCLSafeCall( clAmdFftTeardown( ) );
try
{
openCLSafeCall( clAmdFftTeardown( ) );
}
catch (const std::bad_alloc &)
{ }
delete pCache.setupData; pCache.setupData = NULL;
pCache.started = false;
}