Tag: memory leak testing c++

Detecting memory leaks in VC++

One of the simplest ways to detect a leak in your code would be to use debugCRT. Simple usage: a. Create you project in visual studio b. run the project in debug mode, then only you will find the memory leak dumps int main() { _CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_ALLOC_MEM_DF); //below call will break where the leak

Continue Reading →