Overview
| Artifact ID: | c04206b13771d787ff01bba7e6dd26efe9ca33a4 |
|---|---|
| Ticket: | 442646ffffffffffffffffffffffffffffffffff
Close Windows handle from _beginthreadex |
| User & Date: | mdejong on 2001-07-19 02:14:06 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
The documentation for the _beginthreadex method indicates that the caller is responsible for closing the returned HANDLE object. Tcl does not close this handle which seems like a memory leak to me. The following patch should fix the problem, but if someone that knows a bit more about Windows threads could take a peek I would feel much better about it. The part I am unsure of is if it is ok to call CloseHandle() on a thread handle that is currently alive. Here are some related URLs: http://support.microsoft.com/support/kb/articles/q132/0/78.asp http://technology.niagarac.on.ca/courses/comp831/win32/_beginthread.htm http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__beginthread.2c_._beginthreadex.asp http://www.microsoft.com/msj/0799/win32/win320799.htm 2001-07-18 Mo DeJong <[email protected]> * win/tclWinThrd.c (Tcl_CreateThread): Close Windows HANDLE returned by _beginthreadex since the MS documentation states that this handle is not closed by a later call to _endthreadex.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mdejong"
- subsystem changed to: "49. Threading"
- title changed to: "Close Windows handle from _beginthreadex"
- type changed to: "Patch"