[patch] Memory leak in the thread_specific_ptr implementation in Boost.Threads

11 May
2005
11 May
'05
2:58 p.m.
Hello, It seems to me that there is a possibly huge memory leak in the file boost/libs/thread/src/tss.cpp, as the thread specific data slot vector is allocated (line 120) but never freed. It causes a few bytes' memory leak for each thread, as it appears when using valgrind (see attached files: input program = example.cpp, valgrind output = example.valgrind). I propose here a simple patch to fix this. It works perfectly with my programs, and frankly I cannot see why it should not work. Thanks, Jeremie Detrey.
7340
Age (days ago)
7340
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeremie Detrey