]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Avoid additionnal CORBA invocation to clear context
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 12 Jun 2023 14:50:47 +0000 (16:50 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 12 Jun 2023 14:50:47 +0000 (16:50 +0200)
src/Container/SALOME_PyNode.py

index c2c9b06c715381361df098c7fe737c4510039b53..7045ce8caf8ed12d091e29dc93786267a6120b31 100644 (file)
@@ -375,6 +375,11 @@ class PyScriptNode_i (Engines__POA.PyScriptNode,Generic):
     self.ccode=compile(code,nodeName,'exec')
     self.context={}
     self.context[MY_CONTAINER_ENTRY_IN_GLBS] = self.my_container
+    
+  def __del__(self):
+    # force removal of self.context. Don t know why it s not done by default
+    self.removeAllVarsInContext()
+    pass
 
   def getContainer(self):
     return self.my_container