News for hackers. Stuff that matters.
Re:Show HN: Smart pointers for the C programming language by sepeth on Wednesday January 14, 2015 @03:40PM (#8888870)
I first thought about wrapping malloc to register all allocated data, and then free everything before exiting, but it wasn’t a satisfying solution.

Quick question, Isn't this the same with just leak all the memory that you've allocated. Because, after a process died, operating system will just take it back the memory it used.

Re:Show HN: Smart pointers for the C programming language by Snaipe on Wednesday January 14, 2015 @04:11PM (#8889089)
Yep, but if I just let the system get all the memory back, valgrind would have yelled at us for leaking memory, and it would have been detected by the testing system, slapping us in the face with a malus on our final grade.