]> granicus.if.org Git - python/commitdiff
Break some cycles when the widget is destroyed.
authorGuido van Rossum <guido@python.org>
Fri, 25 Jun 1999 15:53:54 +0000 (15:53 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 25 Jun 1999 15:53:54 +0000 (15:53 +0000)
Lib/lib-tk/tkSimpleDialog.py

index 1e7ed4668cd516dfd7c3fd4324dc3cee62414486..1830d66cbb7c0251525ae312a07ee87dcf61be2a 100644 (file)
@@ -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)