- destroy ?window? ?window ...?
The destroy command is used to destroy Tk windows -- not just toplevel windows, it can just as well destroy individual widgets within a window (in which case the not explicitly destroyed siblings continue to exist).
I recently came across a major problem where my application was leaking huge amounts of memory (over 100 MB). I was using the Img extension and I was loading many graphics into memory, but I was not deleting them with image delete. I fixed this problem by binding the close button and the <Destroy> event to a proc which deleted all photos loaded in memory once I was done with them. I learned that before destroying a toplevel, even in Tcl you have to release resources that you are not using anymore ;DRo