Skip to content
Snippets Groups Projects
Commit 7a30611a authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

BUG: do not release the output for python user

parent a4abbe2a
No related branches found
No related tags found
1 merge request!22Register Pipeline Services (ProcessObjects and DataObjects)
......@@ -504,6 +504,7 @@ Application::RegisterPipeline()
void Application::FreeRessources()
{
std::set< itk::DataObject * > dataSetToRelease; // do not release output
std::set< itk::DataObject * > dataSet;
std::vector<std::string> paramList = GetParametersKeys(true);
// Get the end of the pipeline
......@@ -563,6 +564,7 @@ void Application::FreeRessources()
if ( !newData || dataSet.count( newData ) )
continue;
dataSet.insert( newData );
dataSetToRelease.insert( newData );
itk::ProcessObject * process = newData->GetSource().GetPointer();
if ( process )
processStack.push( process );
......@@ -571,6 +573,7 @@ void Application::FreeRessources()
else
{
dataSet.insert( data.GetPointer() );
dataSetToRelease.insert( data.GetPointer() );
itk::ProcessObject * process = data->GetSource().GetPointer();
if ( process )
processStack.push( process );
......@@ -578,11 +581,11 @@ void Application::FreeRessources()
}
}
// Release data
for ( auto data : dataSet )
for ( auto data : dataSetToRelease )
{
data->ReleaseData();
}
// Call overrode method
// Call override method
DoFreeRessources();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment