Hi,
I am using boost version 1.65.0 in a 32 bit DLL. I use VS2005
When using ApplicationVerifier, I got application verifier stops due to leaked TLS slots.
The TLS slots are allocated in win_tss_ptr_create(). Each slot is wrapped into RAII class win_tss_ptr. The constructor allocates the TLS slot and the destructor de-allocates it.
I put printf-Statements in both methods and I see, that the constructor is called twice, while the destructor is not called at all. If I put a breakpoint into the destructor, it never triggers.
The printf() satemets show, that the following instances have been constructed:
boost::asio::detail::win_tss_ptr::context>::win_tss_ptr
boost::asio::detail::win_tss_ptr::context>::win_tss_ptr
When I put a breakpoint into the constructor, I see, that both instances seem to be global variables
xxx.dll!boost::asio::detail::win_tss_ptr_create() Line 40 C++
xxx.dll!boost::asio::detail::win_tss_ptrboost::asio::detail::win_iocp_io_service,boost::asio::detail::win_iocp_threa...::context>::win_tss_ptrboost::asio::detail::win_iocp_io_service,boost::asio::detail::win_iocp_threa...::context>() Line 42 + 0x3a bytes C++
xxx.dll!boost::asio::detail::tss_ptrboost::asio::detail::win_iocp_io_service,boost::asio::detail::win_iocp_threa...::context>::tss_ptrboost::asio::detail::win_iocp_io_service,boost::asio::detail::win_iocp_threa...::context>() + 0xf bytes C++
xxx.dll!`dynamic initializer for 'boost::asio::detail::call_stackboost::asio::detail::win_iocp_io_service,boost::asio::detail::win_iocp_threa...::top_''() Line 165 + 0xd bytes C++
msvcr80d.dll!_initterm(void (void)* * pfbegin=0x101c43a0, void (void)* * pfend=0x101ce9c0) Line 855 C
xxx.dll!_CRT_INIT(void * hDllHandle=0x10000000, unsigned long dwReason=0x00000001, void * lpreserved=0x00000000) Line 316 + 0xf bytes C
xxx.dll!__DllMainCRTStartup(void * hDllHandle=0x10000000, unsigned long dwReason=0x00000001, void * lpreserved=0x00000000) Line 492 + 0x11 bytes C
xxx.dll!_DllMainCRTStartup(void * hDllHandle=0x10000000, unsigned long dwReason=0x00000001, void * lpreserved=0x00000000) Line 462 + 0x11 bytes C
Does anyone on this list has an idea, why the destructors aren't called?
Thanks in advance,
Mario Klebsch
--
Mario Klebsch Actia I+ME GmbH
Mario.klebsch@ime-actia.demailto:Mario.klebsch@ime-actia.de Dresdenstrasse 17/18
Fon: +49 531 38 701 716 38124 Braunschweig
Fax: +49 531 38 701 88 Germany