N
Nils Henry Madsen
We are working on a .NET program which uses several dlls, both pure c# DLL'S
and dll's written in C++ interop and in addition 3 party SW from several
vendors.
The managed C++ dll are wrappers for interfacing native C++ code which we
have link in as static libraries.
When we exit the program we get very many indications on memroy leaks dumped
by the function _CrtDumpMemoryLeaks. After debugging a bit, the problem is
that at the time _CrtDumpMemoryLeaks is called (destructor of afxState class
inside MFC 8.0 dll), several of the managed C++ dll's are not unloaded, thus
their static/global C++ objects destructors have not been called.
Since we use system multithreaded dll's they share the same heap.
Is there a way to be sure that _CrtDumpMemoryLeaks are called after all
destructors have been called for all dll's? On stop the _CrtDumpMemoryLeaks
called from the destructor of afxState?
and dll's written in C++ interop and in addition 3 party SW from several
vendors.
The managed C++ dll are wrappers for interfacing native C++ code which we
have link in as static libraries.
When we exit the program we get very many indications on memroy leaks dumped
by the function _CrtDumpMemoryLeaks. After debugging a bit, the problem is
that at the time _CrtDumpMemoryLeaks is called (destructor of afxState class
inside MFC 8.0 dll), several of the managed C++ dll's are not unloaded, thus
their static/global C++ objects destructors have not been called.
Since we use system multithreaded dll's they share the same heap.
Is there a way to be sure that _CrtDumpMemoryLeaks are called after all
destructors have been called for all dll's? On stop the _CrtDumpMemoryLeaks
called from the destructor of afxState?