Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. -
CptFox16166y@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 :) -
@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.
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
-
sam966911Hats off to this lady .... I would have just flipped the machine
When you Valgrind your program for the first time for memory leaks and get "85000127 allocs, 85000127 deallocs, no memory leaks possible"
joke/meme
feels good
c++
mathematics dev
valgrind