Tcl_CreateExitHandler arranges for proc to be invoked by Tcl_Exit before it terminates the application. This provides a hook for cleanup operations such as flushing buffers and freeing global memory. Proc should have arguments and return value that match the type Tcl_ExitProc:
typedef void Tcl_ExitProc(ClientData clientData);The clientData parameter to proc is a copy of the clientData argument given to Tcl_CreateExitHandler when the callback was created. Typically, clientData points to a data structure containing application-specific information about what to do in proc.
Tcl_DeleteExitHandler may be called to delete a previously-created exit handler. It removes the handler indicated by proc and clientData so that no call to proc will be made. If no such handler exists then Tcl_DeleteExitHandler does nothing.
Copyright © 1995-1996 Sun Microsystems, Inc. Copyright © 1995, 1996 Roger E. Critchlow Jr.