From efd8fbcc98e15af83781fc82a831500e157e0532 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 12 Apr 2002 10:19:49 +0000 Subject: unix/tkUnixSend.c (TkSendCleanup): free send-related resources --- unix/tkUnixSend.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 14c8a7e..4962e71 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixSend.c,v 1.5 2002/01/25 21:09:37 dgp Exp $ + * RCS: @(#) $Id: tkUnixSend.c,v 1.6 2002/04/12 10:19:49 hobbs Exp $ */ #include "tkPort.h" @@ -1256,6 +1256,39 @@ TkGetInterpNames(interp, tkwin) /* *-------------------------------------------------------------- * + * TkSendCleanup -- + * + * This procedure is called to free resources used by the + * communication channels for sending commands and + * receiving results. + * + * Results: + * None. + * + * Side effects: + * Frees various data structures and windows. + * + *-------------------------------------------------------------- + */ + +void +TkSendCleanup(dispPtr) + TkDisplay *dispPtr; +{ + if (dispPtr->commTkwin != NULL) { + Tk_DeleteEventHandler(dispPtr->commTkwin, PropertyChangeMask, + SendEventProc, (ClientData) dispPtr); +#ifdef PURIFY + /* Tk_DestroyWindow(dispPtr->commTkwin); */ + ckfree((char *) dispPtr->commTkwin); +#endif + dispPtr->commTkwin = NULL; + } +} + +/* + *-------------------------------------------------------------- + * * SendInit -- * * This procedure is called to initialize the -- cgit v0.12