Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » C++ » How to find Memory leak in C++

How to find Memory leak in C++ using Valgrind


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 :

find memory leak in C/C++ code using Valgrind tool on linux

Other Categories

MCQ on C Programming MCQ on C++ Programming Basic Computer Questions Solved C programs Solved C++ programs