Boost logo

Boost :

Subject: Re: [boost] [thread] Memory leak in Boost.Thread?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-08-27 07:25:07


> Hello,
>
> a Fedora user has reported a potential memory leak in Boost.Thread (see
> https://bugzilla.redhat.com/show_bug.cgi?id=627875 for details), detected
> with Valgrind in (at least) versions 1.41.0 and 1.44.0.

> Is that really a memory leak?

most likely not. the memory in question is freed by a deleter of
pthread_key_create, which means when the (main) thread is exited.
valgrind apparently does the leak checking before that.

here's the code in question:
http://svn.boost.org/svn/boost/trunk/libs/thread/src/pthread/once.cpp


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk