Tcl Source Code

View Ticket
Login
Ticket UUID: 464380
Title: Memory leak in Tcl_ExitThread()
Type: Bug Version: obsolete: 8.4a3
Submitter: rbrunner Created on: 2001-09-24 12:08:24
Subsystem: 49. Threading Assigned To: andreas_kupries
Priority: 7 High Severity:
Status: Closed Last Modified: 2001-10-03 23:40:04
Resolution: Fixed Closed By: hobbs
    Closed on: 2001-10-03 16:40:04
Description:
Tcl_FinalizeThread is not only called by Tcl_Finalize, 
but also by Tcl_ExitThread. There however, the 
reference count of tsdPtr->tclLibraryPath is not 
decremented. This results in a memory leak when 
creating and destroying threads.

Attached is a patch for tclEvent.c that checks for and 
frees this object in Tcl_FinalizeThread instead of in 
Tcl_Finalize.

-> fix memory leak in Tcl_ExitThread
User Comments: hobbs added on 2001-10-03 23:40:04:
Logged In: YES 
user_id=72656

Had to adjust where in Tcl_FinalizeThread this was called 
(to before the thread exit handlers) to support thread-
local storage use for objects in the threaded object 
allocator proposed by Zoran.

andreas_kupries added on 2001-09-25 00:55:50:
Logged In: YES 
user_id=75003

Change accepted and committed to HEAD and the 8.3.3 branch.

rbrunner added on 2001-09-24 19:08:25:

File Added - 11139: tclEvent-patch-8.4a3

Attachments: