Use valgrind to debug C/C++ applications

Use the flag -g3 to compile the application. with gcc (or g++)

After the compilation run your application with the following flags:
--leak-check=full --show-leak-kinds=all --leak-resolution=high --track-origins=yes --vgdb=yes

Leave a Reply