Memory leak indiaction in .NET app with C++ interop dll's

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?
 
D

Douglas J. Steele

Sorry, this newsgroup is intended for questions related to VBA Modules in
Access, the database product that's part of Office Professional.

You'll need to find a more relevant newsgroup to which to repost your
question, one related to .Net.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top