How to find memory leak in a C++ code/project?

I am a C++ programmer on the Windows platform. I am using Visual Studio 2008.

I usually end up in the code with memory leaks.

Normally I find the memory leak by inspecting the code, but it is cumbersome and is not always a good approach.

Since I can’t afford a paid memory leak detection tool, I wanted you guys to suggest the best possible ways to avoid memory leaks.

  1. I want to the know how the programmer can find memory leaks.
  2. Is there any standard or procedure one should follow to ensure there is no memory leak in the program?

19 Answers
19

Leave a Comment