]> 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>
Tue, 22 Aug 2023 09:40:50 +0000 (11:40 +0200)
src/Container/SALOME_PyNode.py

index e54dc8b3a893a0427988fb514f8e1ee214cac85d..dfc5467e88b4886dc2371b7e5c301a719e372d6f 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