Strangely, I haven't heard of __del__ since I first learn some python (version 1.6, I guess).
In the meantime, I found there is one more way in Swing, and that is Runtime.addShut downHook(Thread ).
I defined this function:
Code:
class ShutdownTask( java.lang.Thread ):
def __init__( self, connection ):
self.conn = connection
Leave a comment: