valgrind linux code example
Example 1: valgrind detect memory leak
valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt \
./executable exampleParam1
Example 2: valgrind
valgrind --leak-check=yes myprog arg1 arg2