Interview Questions on C C++

Home  |  About Us  |  Contact
View Questions Contribute Training Misc..

How to find Memory leak in C++ (Example of Valgrind)

You are here : Home » How to find Memory leak in C++

Valgrind is the best tools ever to detect memory leak in C/C++ on Linux. Its free and can be downloaded easiely. It basically results two types of memory leak first one is Direct memory leak while other one is Indirect memory leak.

Direct Memory Leak - In this programmer miss to deleted allocated memory.
Indiret Memory Leak - In this, memory is leak by inbuild library functions, which we can't fix.

Example of output produced by Valgrind:

memory leak in C++

Other links :

MCQ on C Programming  |  MCQ on C++ Programming  |  138+ Subjective Questions on C++  |  Basic Computer Questions |  Solved C programs  |  Solved C++ programs