Commit ab50f657 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: issue with threads cleaning in fftw

parent 173c96d2
......@@ -75,6 +75,22 @@ public:
itkTypeMacro(Self, otb::Application);
private:
DomainTransform() {}
~DomainTransform() ITK_OVERRIDE
{
// This is a trick to make sure fftw will cleanup its threads when application
// shared lib is released.
#if defined(ITK_USE_FFTWF)
fftwf_cleanup_threads();
fftwf_cleanup();
#endif
#if defined(ITK_USE_FFTWD)
fftw_cleanup_threads();
fftw_cleanup();
#endif
}
void DoInit() ITK_OVERRIDE
{
SetName("DomainTransform");
......
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