Boost logo

Boost Users :

From: alansa_at_[hidden]
Date: 2004-11-23 08:07:28


I don't mind any one off small leaks. They may not be nice but no one is
going to notice them. What bothers me is when memory keeps leaking for each
iteration of the loop.

I don't bother with the microsoft crt leak stuff. It's rarely that much use
in complex projects and even if it does detect a leak it rarely can tell you
where it is. As it turns out the crt leak detect stuff doesn't seem to show
any leak (at least on my system), but lets say I put in my own my own leak
of say new char[10] or something then the leak messages pour out.

Use windows performance counters however and it's a different story, watch
the working set rocket up. And it seems to increase at different rates
depending on what the thread is doing. Eventually you will run out of memory
entirely. Use the crt dll in your main program however and the working set
is dead flat.

>What I don't understand is your mentioning of the boost::function lib.
>Where do you think it is getting used in
>your example?

boost::function is being used in the constructor of thread i believe.

Has anyone been able to confirm this leak or is it just me?

Naturally boost::threads is a dll only (at least v 1.30 which i'm currently
using) and it itself can either link dynamically or statically to the crt.
It doesn't make any difference which though. I have to link dynamically to
crt in my program to avoid the leak. Why should this make a difference?

I don't particular want to upgrade to 1.32 for my project as it's rather
late in the day. I don't want any other issues creeping in and I've resolved
the issue by using the dll. However I thought I should report my findings
and see if anyone knows anything about it. Do we know if there is no leak in
1.32 or is it still there?

Thanks.

Alan


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