Boost logo

Boost Users :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2007-01-21 17:03:27


-----Original Message-----
From: boost-users-bounces_at_[hidden] on behalf of Peter Dimov
Sent: Sun 1/21/2007 1:30 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Does boost::thread_group::create_thread havememory leak?
 
Sohail Somani wrote:

> I ran the OPs tests and I agree with your statement, except that it
> *does* depend on the number of threads. If I created two threads -> I
> got two leaks.

Try joining the first thread before creating a second one; it's likely that
the block will be reused by libpthread (something that can't happen with a
leak).

-----

This is correct. The OP should put in some valgrind suppression rules I suppose (i.e., not a leak).

Would it make sense to address this and the usual "boost threads has a leak on windows" question in the boost threads documentation? Perhaps under the "Implementation Notes" section?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net