Skip to content
Snippets Groups Projects
Commit ab50f657 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: issue with threads cleaning in fftw

parent 173c96d2
Branches
Tags
No related merge requests found
...@@ -75,6 +75,22 @@ public: ...@@ -75,6 +75,22 @@ public:
itkTypeMacro(Self, otb::Application); itkTypeMacro(Self, otb::Application);
private: 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 void DoInit() ITK_OVERRIDE
{ {
SetName("DomainTransform"); SetName("DomainTransform");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment