Re: Re: FW: Leak when using boost threads under VC .NET using usi ng statically linked CRT

The interesting part is that it doesn't leak if use the version of
built using the CRT as a .dll rather than static link. I also believe
threads that
the actual culprit is somewhere in boost.function since the code for boost.thread is so straight forward.
This sounds more like a mismatch between the runtime libraries that Boost was compiled for (MSVCRT.DLL I'm pretty sure) and the one you're linking with. Do you get a linker error indicating that there are conflicting libraries?
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.

alansa@ati-uk.com wrote:
The interesting part is that it doesn't leak if use the version of threads built using the CRT as a .dll rather than static link. I also believe that the actual culprit is somewhere in boost.function since the code for boost.thread is so straight forward.
This sounds more like a mismatch between the runtime libraries that Boost was compiled for (MSVCRT.DLL I'm pretty sure) and the one you're linking with. Do you get a linker error indicating that there are conflicting libraries?
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? Roland
participants (2)
-
alansa@ati-uk.com
-
Roland Schwarz