Index: tclWinThrd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinThrd.c,v
retrieving revision 1.11
diff -c -r1.11 tclWinThrd.c
*** tclWinThrd.c	2000/06/13 20:30:24	1.11
--- tclWinThrd.c	2001/04/28 02:30:13
***************
*** 148,153 ****
--- 148,160 ----
  	}
  
  	LeaveCriticalSection(&joinLock);
+ 
+ 	/*
+ 	 * Decrement the reference count to this kernel object
+ 	 * so the OS will destroy the resources when the thread closes.
+ 	 */
+ 
+ 	CloseHandle((HANDLE) code);
  	return TCL_OK;
      }
  }
***************
*** 479,484 ****
--- 486,492 ----
  {
      CRITICAL_SECTION *csPtr = *(CRITICAL_SECTION **)mutexPtr;
      if (csPtr != NULL) {
+ 	DeleteCriticalSection(csPtr);
  	ckfree((char *)csPtr);
  	*mutexPtr = NULL;
      }
***************
*** 947,952 ****
--- 955,961 ----
       */
  
      if (winCondPtr != NULL) {
+ 	DeleteCriticalSection(&winCondPtr->condLock);
  	ckfree((char *)winCondPtr);
  	*condPtr = NULL;
      }

