How do you test for memory leaks with Valgrind?

How do you test for memory leaks with Valgrind?
Answer
Valgrind includes an option to check for memory leaks. With no option given, it will list a heap summary where it will say if there is any memory that has been allocated but not freed. If you use the option –leak-check=full it will give more information.
 

Tìm kiếm

Back
Top