Patch #1494750: Destroy master after deleting children.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 3370903..2a5ecd7 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1933,9 +1933,9 @@
     def destroy(self):
         """Destroy this and all descendants widgets."""
         for c in self.children.values(): c.destroy()
+        self.tk.call('destroy', self._w)
         if self.master.children.has_key(self._name):
             del self.master.children[self._name]
-        self.tk.call('destroy', self._w)
         Misc.destroy(self)
     def _do(self, name, args=()):
         # XXX Obsolete -- better use self.tk.call directly!