Smart Pointer Pointers
TL;DR - Switch raw heap pointers to unique_ptrs when possible. If your heap allocated resource needs multiple owners, use a shared_ptr instead.
I find myself reviewing C++ smart pointer types over and over again. I guess for me, it’s just been one of those things that doesn’t stick, or perhaps I’ve only needed to use them infrequently enough to forget about them. So, here’s a note to myself, and anyone else dying to read about smart pointers in C++.
Read more