-----Original Message----- From: Alan Saunders Sent: 22 November 2004 17:24 To: 'boost-users@lists.boost.org' Subject:
Hmmm no linker errors or warnings. I've set my main exe to statically link. if i use the version of threads that statically links to msvcrt71 or dynamically to msvcrt71.dll it doesn't seem to make any difference. Our boost libraries where compiled here for msvcrt71 and i can confirm this.
As i say if my main exe uses msvcrt71.dll then theres no leak.
Are you using tls code? TLS currently (as to my knowledge) contains a "intentional" leak which however is harmless. Could you post the messages? Did you track down the leak?
Hi Roland In order to clear random influences from other areas of the software i'm working on, I have created a simple program with the code that i listed before. nothing else, no tls code. The intentinal leak would be harmless if it did not keep increasing. If I let the program run for long enough i will run out of memory. Sorry which messages would you like me to post? Haven't tracked down the leak yet. My problem is solved for the time being by using msvcrt71.dll as i said before. However it would be nice to be able to using the static lib. I replace the code in the loop which constantly starts and stop threads with my own code that did the same thing. This code was pretty much the same as the code for boost::thread using the windows api functions. This did not leak. However the big difference between my code and boost::thread is that my code didn't use boost::function. Therefore I suspect the leak could be in there! Looking at function it certainly isn't as trivial as thread. One thing i have noticed is that there is an option to get function to use "new" instead of std::allocator with the macro BOOST_NO_STD_ALLOCATOR. (function_template.hpp). I haven't got round to trying this yet though. Alan