Boost logo

Boost Users :

From: zhengyi (goodmen_at_[hidden])
Date: 2005-03-16 01:38:38


Now,I found some memory leaks of boost::thread library.

I trace down the code and find that when thread lib's dll
is loading , a mutex was created in the boost_thread-vc71-mt-gdp-1_32.dll::dllmain()
function's "case DLL_PROCESS_ATTACH:" branch .In on_process_enter(),
I found that boost::mutex* threadmon_mutex was created.

When the program is exiting , in "case DLL_PROCESS_DETACH:" branch of
Dllmain() , the code does not kill the threadmon_mutex ,
so , some memory was leaked.

In MFC project , the memory leak can be detected by the vs71.
but in win32 console project , vs71 does not report the
problem ,althrogh the memory leak exits
( at least I think there is memory leak , because i found that
the mutex constructor was call one more time than it's destructor).

Any one Can tell me the solution?
Is it
a bug of thread or
a bug of my brain or
a bug of msvc71 ?

              gooodmen_at_[hidden]
                 2005-03-16


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