Salome HOME
Reduce overall memory peak client+server
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 3 Apr 2020 19:42:33 +0000 (21:42 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 3 Apr 2020 19:42:33 +0000 (21:42 +0200)
src/runtime/PythonNode.cxx

index 79382d90c45226e93a5087434c5269253feaca1d..ea67e71435b6df0b8df7cd72061fe42a566ec0c5 100644 (file)
@@ -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() << " ++++++++++++++++++++" );
 }