29
CptFox
6y

When you Valgrind your program for the first time for memory leaks and get "85000127 allocs, 85000127 deallocs, no memory leaks possible"

Comments
  • 2
    Wow.
    I am very close to losing my mind because of C++ memory leaks in this codebase I'm working with :/

    Fucking idiots can't use smart pointers and barely know how (or when) to deallocate something.
  • 2
    C 😸
  • 1
    @RememberMe Man, sucks that you can't use smart pointers, I love these automagical things.

    Maybe try to add a valgrind memleak check to code reviews, to enforce a no leaks policy on a per merge basis ?
    If you're not lead, try to argue with lead that a valgrind step or a use of smart pointers could really improve performance and code sanity :)
  • 0
    @CptFox actually the application has a very interesting allocation pattern and I think I can write a custom arena allocator to take advantage of it, so yeah. I'll start fixing the leaks after that.

    Definitely going to enforce valgrind in test suite. clang static analysis as well.
Add Comment