From: Guido van Rossum Date: Fri, 25 Jun 1999 15:53:54 +0000 (+0000) Subject: Break some cycles when the widget is destroyed. X-Git-Tag: v1.6a1~1155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ea8f8404c8291563a77af1fd6acd7920d24b24e;p=thirdparty%2FPython%2Fcpython.git Break some cycles when the widget is destroyed. --- diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 1e7ed4668cd5..1830d66cbb7c 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -48,6 +48,10 @@ class Dialog(Toplevel): self.wait_window(self) + def destroy(self): + self.initial_focus = None + Toplevel.destroy(self) + # # construction hooks @@ -131,6 +135,10 @@ class _QueryDialog(Dialog): Dialog.__init__(self, parent, title) + def destroy(self): + self.entry = None + Dialog.destroy(self) + def body(self, master): w = Label(master, text=self.prompt, justify=LEFT)