Tcl Source Code

Attachment Details
Login
Overview

Artifact ID: 90fba6966b8876cf4c641b9b5420ccec381cf85e
Ticket: 419683ffffffffffffffffffffffffffffffffff
Date: 2001-04-28 09:40:00
User: davygrvy
Artifact Attached: f1699ca3dc06a855213b173ae954ea809b6762b6
Filename:patch.txt
Description:
Content:
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;
      }