5 ms·
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 s
by ncmncm 4y ago
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.
- TillE 4y agoYeah 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.