Stop Calling delete: A Practical Guide to unique_ptr and shared_ptr in Modern C++
Raw delete calls are one exception away from a leak. Here's how to choose between unique_ptr, shared_ptr, and weak_ptr — with working code, the cycle trap, and a sanitizer check.