News for hackers. Stuff that matters.
Re:Comparing C and C++ usage and performance with a real wor... by zvrba on Sunday September 03, 2017 @12:38PM (#15162342)
> As for the "memory leaks" --- I haven't looked at the source, but something whose runtime is very short-lived, like pkg-config, may be very well justified in allocating and never freeing, letting the process exit itself be the "ultimate free".

But sometimes the code grows and what was once a stand-alone executable is about to become a component in a larger executable. With C++ you get a correct component out of the box (if you use RAII consistently), but with C you have to audit all of the code and clean up the leaks.

Re:Comparing C and C++ usage and performance with a real wor... by jackmott on Sunday September 03, 2017 @03:22PM (#15163310)
bit of a tautology there. correct if correct.
Re:Comparing C and C++ usage and performance with a real wor... by astrobe_ on Sunday September 03, 2017 @03:41PM (#15163408)
Correct if correct, portable if portable, modular if modular, and future-proof if the future isn't too surprising.