Hello All,

I develop MFC Extension DLL and I need the Memory Leak detection and show in the output window of my VS IDE
I try to set the project to debug mode and also put _DEBUG but when I run my DLL with the program that I develp the DLL for (I don't have any source code about this program) that program is Hang (freeze) and I can't do anything, But when I remove the _DEBUG preprocessor I can run the program with my DLL properly

so it can be that Program check about the _DEBUG and stop to run or do something else or any idea?

Come back to the Memory Leak Detection, I already set

_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF); at the beginning of the program


_CrtDumpMemoryLeaks() at the end of program

but from the above reason I can't execute the program to see the any memory leak in the output window, and I try to

run without the _DEBUG preprocessor but I still can't see any result in the output window too. (I know it's have a

memory leaks some where in my code)

It have another way to do this or not without the _DEBUG preprocessor and for this situation.

any suggestion are welcome.

FYI: I already try with small console app with some code for testing and It's work. It's show the Memory leaks object in the Output window. but that I work with is a MFC extension DLL , so It shoud work also Right? or I misunderstand.

Thanks for your help