Tcl Source Code

Artifact [f1699ca3dc]
Login

Artifact f1699ca3dc06a855213b173ae954ea809b6762b6:

Attachment "patch.txt" to ticket [419683ffff] added by davygrvy 2001-04-28 09:40:00.
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;
      }