NAME
Tcl_WatchInterp - arrange for callback when interpreter is deleted.

SYNOPSIS
#include <tcl.h>

Tcl_WatchInterp(interp, proc, clientData)

ARGUMENTS
Interpreter whose deletion should be monitored. Name of new command. Procedure to invoke just before interp is deleted. Arbitrary one-word value to pass to proc.

DESCRIPTION

Tcl_WatchInterp arranges for proc to be called by Tcl_DeleteInterp if/when interp is deleted at some future time. Proc will be invoked just before the interpreter is deleted, but the interpreter will still be valid at the time of the call. Proc should have the following structure:
    void
    proc(clientData, interp)
        ClientData clientData;
        Tcl_Interp *interp;
    {
    }
The clientData and interp parameters are copies of the clientData and interp arguments given to Tcl_WatchInterp. Typically, clientData points to an application-specific data structure that proc uses to perform cleanup when an interpreter is about to go away. Proc does not return a value.

KEYWORDS
callback, delete, interpreter