https://bugs.kde.org/show_bug.cgi?id=400782

--- Comment #2 from Andrew Pennebaker <andrew.penneba...@gmail.com> ---
I'm not the best C/C++ programmer, but I am learning about manual memory
management, and I have a small example app that I believe should not require
manual free(). However, valgrind is reporting that hex_buf is lost unless I
free() it, even though I immediately return from main() at this point.

https://gist.github.com/mcandre/1ac317f0ee1381e8609561b2b246d6fa#file-fewer-c-L92

Am I doing this correctly? Should I perhaps use exit() instead of return to
indicate this more clearly to valgrind?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to