O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Final Cleanup

When a widget is destroyed, you need to free up any resources it has allocated. The resources associated with attributes are cleaned up by Tk_FreeOptions. The others you must take care of yourself. The ClockDestroy procedure is called as a result of the Tk_EventuallyFree call in the ClockEventProc. The Tk_EventuallyFree procedure is part of a protocol that is needed for widgets that might get deleted when in the middle of processing. Typically the Tk_Preserve and Tk_Release procedures are called at the beginning and end of the widget instance command to mark the widget as being in use. Tk_EventuallyFree will wait until Tk_Release ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required