Version 0 of destroy

Updated 2001-06-07 14:57:24

http://tcl.activestate.com/man/tcl8.4/TkCmd/destroy.htm


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 ;D

Ro


Tk syntax help - Arts and crafts of Tcl-Tk programming