
7 Mar
2007
7 Mar
'07
5:35 p.m.
n.torrey.pines@gmail.com wrote:
On 3/6/07, Sohail Somani
wrote: If you make 10 threads or 1 thread, it's the same amount of memory that goes without deallocation.
That appears to be correct. I wonder though why Boost.Thread needs to leak memory at all: was that a choice or an oversight?
Choice. I was able to avoid the allocation in this specific case: http://boost.cvs.sourceforge.net/boost/boost/libs/thread/src/tss_hooks.cpp?revision=1.4&view=markup but in general, objects that need to have program lifetime cannot be deleted safely. Many industrial-grade leak checkers will not report such objects as leaks, because they aren't.