I followed the steps outlined here to find memory leaks in a C++ program that I compiled using -g
, but the program never terminates, and thus the memory leaks check doesn't end.
Whereas by using the same C++ program this time compiled using -Os
the valgrind check terminates.
What can I do then?