Skip to content

Commit b910d27

Browse files
authored
Clean up instances at program end
When the program is closed, the instances can be cleaned up using the destroy method.
1 parent cc3b0af commit b910d27

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

PyFlow/Core/Common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ def __init__(self, cls):
726726
self.allInstances.append(self)
727727

728728
def destroy(self):
729+
if ('destroy' in dir(self.instance)):
730+
self.instance.destroy()
729731
del self.instance
730732
self.instance = None
731733

0 commit comments

Comments
 (0)