Boost logo

Boost Users :

From: pete_at_[hidden]
Date: 2007-01-19 17:15:15


On Fri, Jan 19, 2007 at 11:26:50AM +0100, Roland Schwarz wrote:
> pete_at_[hidden] wrote:
> > I've been trying to track down memory leak being reported by valgrind.
> <snipped>
> > /usr/lib/libboost_thread-mt.so.1.33.1)
>
> Version 1.33 is know to have a memory leak, but I am surprised that it
> shows up on linux.
> Can you repeat this with the 1.34 CVS version?

I complied against the latest cvs version and still got the leak.

   boost::thread_group::create_thread(boost::function0<void,
   std::allocator<boost::function_base> > const&) (thread.cpp:338)

It appears to come from this line in boost/lib/src/pthread.cpp:

   std::auto_ptr<thread> thrd(new thread(threadfunc));

Could it be that the leak is being created by using the tmp object in
the thread creation? I've read advise about NOT doing that?

I realized after reading your email again that 1.34 is what you
specified, but I used 1.35. Would that be a problem?

Thanks,

Pete


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