I am trying to debug a large application build using Qt/C++ and valgrind is reporting a lot of memory leak from internal Qt stuff. Could anyone share a proper valgrind suppr
still reachable: 744 bytes in 7 blocks
If you release QObject o? Do still have the same result?
Update: Just to clarify, this memory will be released by the os when you close the application (so it is not a leak).
However for you own sake it is always good to write a destructor that releases the memory, and it always feels nice to know that you have control over what is allocated and deallocated. (so you don't end up with real memory leaks...)
--show-reachable shows memory that hasn't actually leaked, even though valgrind calls it a loss record. Your test app doesn't leak any memory.
You don't need any valgrind suppressions for this particular case. For others, maybe, but you should use valgrind's --gen-suppressions option to generate those suppressions for you.
The above valgrind log reports 0 leaks, i.e. there are no errors.