News for hackers. Stuff that matters.
Re:C++ by Example by ncmncm on Thursday September 22, 2022 @10:56AM (#32939703)
Good news, with modern usage, memory leaks are a thing of the fast-receding past. Occasion to investigate core dumps is lately vanishingly rare. (I have spent strictly more time filing compiler bug reports, in recent years, than debugging memory usage violations.)

Today, it is fun to code in C++. Restricting it to performance-critical uses would be a bad mistake. Displacing C with simpler, more reliable, often faster C++ is an easy choice, but reaching for C++ in place of Python is also often a great idea.

Re:C++ by Example by TillE on Thursday September 22, 2022 @12:56PM (#32941565)
Yeah I literally have not had a single memory leak since I started using unique_ptr and shared_ptr everywhere.

I have had a couple resource leaks with C APIs, though even they could have been avoided with unique_ptr and a custom deleter.