$:~/test$ valgrind --tool=memcheck --leak-check=full ./main ==4886== Memcheck, a memory error detector ==4886== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==4886== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==4886== Command: ./main ==4886== ==4886== ==4886== HEAP SUMMARY: ==4886== in use at exit: 10 bytes in 1 blocks ==4886== total heap usage: 1 allocs, 0 frees, 10 bytes allocated ==4886== ==4886== 10 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==4886== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==4886== by 0x400505: main (main.cpp:3) ==4886== ==4886== LEAK SUMMARY: ==4886== definitely lost: 10 bytes in 1 blocks ==4886== indirectly lost: 0 bytes in 0 blocks ==4886== possibly lost: 0 bytes in 0 blocks ==4886== still reachable: 0 bytes in 0 blocks ==4886== suppressed: 0 bytes in 0 blocks ==4886== ==4886== For counts of detected and suppressed errors, rerun with: -v ==4886== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)