--- a/graphics/FBD_Objects.py Fri Sep 05 18:12:23 2008 +0200
+++ b/graphics/FBD_Objects.py Fri Sep 05 18:13:18 2008 +0200
@@ -64,9 +64,12 @@
block.Outputs = [output.Clone(block) for output in self.Outputs]
return block
- # Destructor
- def __del__(self):
+ def Flush(self):
+ for input in self.Inputs:
+ input.Flush()
self.Inputs = []
+ for output in self.Outputs:
+ output.Flush()
self.Outputs = []
# Returns the RedrawRect
@@ -434,10 +437,13 @@
variable.Output = self.Output.Clone(variable)
return variable
- # Destructor
- def __del__(self):
- self.Input = None
- self.Output = None
+ def Flush(self):
+ if self.Input is not None:
+ self.Input.Flush()
+ self.Input = None
+ if self.Output is not None:
+ self.Output.Flush()
+ self.Output = None
# Returns the RedrawRect
def GetRedrawRect(self, movex = 0, movey = 0):
@@ -672,9 +678,10 @@
self.RefreshConnectors()
self.RefreshNameSize()
- # Destructor
- def __del__(self):
- self.Connector = None
+ def Flush(self):
+ if self.Connector:
+ self.Connector.Flush()
+ self.Connector = None
# Returns the RedrawRect
def GetRedrawRect(self, movex = 0, movey = 0):