From a1bb487ce93865076ae279ae659397943bf1c67a Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 3 Apr 2020 21:42:33 +0200 Subject: [PATCH] Reduce overall memory peak client+server --- src/runtime/PythonNode.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runtime/PythonNode.cxx b/src/runtime/PythonNode.cxx index 79382d90c..ea67e7143 100644 --- a/src/runtime/PythonNode.cxx +++ b/src/runtime/PythonNode.cxx @@ -474,6 +474,15 @@ void PythonNode::executeRemote() _errorDetails=msg; throw Exception(msg); } + if(!CORBA::is_nil(_pynode)) + { + _pynode->UnRegister(); + } + _pynode = Engines::PyScriptNode::_nil(); + // + bool dummy; + Engines::Container_var cont(GetContainerObj(this,dummy)); + cont->removePyScriptNode(getName().c_str()); DEBTRACE( "-----------------end of remote python invocation-----------------" ); //=========================================================================== // Get results, unpickle and put them in output ports @@ -546,15 +555,6 @@ void PythonNode::executeRemote() if(_autoSqueeze) squeezeMemoryRemote(); } - // - if(!CORBA::is_nil(_pynode)) - { - _pynode->UnRegister(); - } - _pynode = Engines::PyScriptNode::_nil(); - bool dummy; - Engines::Container_var cont(GetContainerObj(this,dummy)); - cont->removePyScriptNode(getName().c_str()); DEBTRACE( "++++++++++++++ ENDOF PyNode::executeRemote: " << getName() << " ++++++++++++++++++++" ); } -- 2.39.2