Commit 2bfceddc authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: avoid dl-close issue by cleaning resources ourselves

parent 8ece8efb
......@@ -103,5 +103,12 @@ int main(int argc, char* argv[])
mainWindow->show();
// Start event processing loop
return qtApp.exec();
int ret = qtApp.exec();
// Clean resources
if (mainWindow) delete mainWindow;
app = ITK_NULLPTR;
ApplicationRegistry::CleanRegistry();
return ret;
}
......@@ -104,6 +104,8 @@ int otbWrapperQtWidgetShowWidget(int argc, char* argv[])
// clean main window
if (mainWindow) delete mainWindow;
}
ApplicationRegistry::CleanRegistry();
if (result)
{
......
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