diff options
author | hobbs <hobbs@noemail.net> | 2002-04-12 06:31:28 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2002-04-12 06:31:28 (GMT) |
commit | d8b5cbf8368c456093869cc74e9f61a8dc608356 (patch) | |
tree | 05e2e92bc2a881c40aded5cfe133476fc8b7d851 /generic | |
parent | 6bf0ccff79cfb2514c496cea79b3b1b9431b6edd (diff) | |
download | tcl-d8b5cbf8368c456093869cc74e9f61a8dc608356.zip tcl-d8b5cbf8368c456093869cc74e9f61a8dc608356.tar.gz tcl-d8b5cbf8368c456093869cc74e9f61a8dc608356.tar.bz2 |
* generic/tclNotify.c (TclFinalizeNotifier): remove remaining
unserviced events on finalization.
FossilOrigin-Name: d66560f92113f16bcfba906c4041574e7b50d62b
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclNotify.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 8c93cef..2f32adc 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.7 2000/04/04 20:28:42 kupries Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.8 2002/04/12 06:31:28 hobbs Exp $ */ #include "tclInt.h" @@ -146,6 +146,17 @@ TclFinalizeNotifier() { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); ThreadSpecificData **prevPtrPtr; + Tcl_Event *evPtr, *hold; + + Tcl_MutexLock(&(tsdPtr->queueMutex)); + for (evPtr = tsdPtr->firstEventPtr; evPtr != (Tcl_Event *) NULL; ) { + hold = evPtr; + evPtr = evPtr->nextPtr; + ckfree((char *) hold); + } + tsdPtr->firstEventPtr = NULL; + tsdPtr->lastEventPtr = NULL; + Tcl_MutexUnlock(&(tsdPtr->queueMutex)); Tcl_MutexLock(&listLock); |