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.
I have had a couple resource leaks with C APIs, though even they could have been avoided with unique_ptr and a custom deleter.
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.