• Advertisement
Sign in to follow this  

Memory leak when using Regular MFC dll with MFC application.

This topic is 3035 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have created a regular shared MFC dll and I am using it in an MFC Application. My dll contains some functions that I want to use in my MFC Application. At the moment I have just linked my dll with the MFC Application and I haven't started using the dll functions. Now, when I start and then close my application, I get memory leaks. I can't understand why these leeks are occurring since, I am not allocating anything in my dll. My init and exit functions in dll looks like this, BOOL CdllApp::InitInstance() { TRACE0("CDLL.DLL Initializing!\n"); CWinApp::InitInstance(); return TRUE; } int CdllApp::ExitInstance() { TRACE0("CDLL.DLL Terminating!\n"); return CWinApp::ExitInstance(); } And using TRACE0 I can see that these functions are called correctly. I am also using _CrtSetBreakAlloc(); with the "Allocation order number" that I get as memory leak dump when using _CrtDumpMemoryLeaks();. But still the debugger is unable to break at the correct location. Please guide me if you know why these leaks are occurring. Thank you Best regards

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement