Artifacts Associated With Ticket 442646ffffffffff
Ticket change [c04206b137] (rid 102374) by mdejong on 2001-07-19 02:14:06:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized 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 initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mdejong"
- subsystem initialized to: "49. Threading"
- title initialized to: "Close Windows handle from _beginthreadex"
- type initialized to: "Patch"
Add attachment "patch" [adf61c4e37] (rid 101546) by mdejong on 2001-07-19 09:14:07.
Ticket change [fe5e9a86ef] (rid 108577) by mdejong on 2001-07-19 09:14:07:
- icomment:
File Added - 8589: patch
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [406c18c2bd] (rid 121625) by hobbs on 2001-07-20 05:26:26:
- assignee changed to: "hobbs"
Ticket change [1802f7d9da] (rid 122594) by mdejong on 2001-07-24 11:43:08:
- icomment:
Logged In: YES user_id=90858 Any reaction to this patch? It is kind of holding up another Cygwin patch so I if someone could take a look at it that would be great. I ran the tcl tests and the thread tests with this patch applied and I did not notice any ill effects.
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [4f193fd13a] (rid 125766) by hobbs on 2001-07-25 02:02:17:
- icomment:
Logged In: YES user_id=72656 Sorry, at the conference and right before makes things a little hectic for checking patches. Anyway, this looks correct to me. If it passes 'make test' on Windows with and without --enable-symbols, then I'd say put it in.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [52c055094d] (rid 126370) by mdejong on 2001-07-25 02:49:59:
- closedate changed to: "2001-07-24T19:49:59"
- closer changed to: "mdejong"
- icomment:
Logged In: YES user_id=90858 Ok, I am adding this patch since it does not change any of the test results and should plug a memory leak.
- login: "mdejong"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"
- username: "mdejong"