Also, if you’re doing digital audio or anything which involves multiple threads, you need to be careful, because shared_ptr is not thread-safe, and this can cause hard-to-understand thread bugs in apparently thread-safe code if the destructor sometimes goes off in one thread and sometimes in another.
The last company I worked at, which had pretty serious C++ coding standards, prohibited all reference-counted C++ shared pointers unless you could prove there was no simpler, more obvious way to do it. I only remember seeing one case. Inevitably, removing this idea makes the code smaller and clearer.
People who grep up with Java use far too many pointers in their C++. Many times, passing small or medium things by value is just what you want, faster, smaller and with no memory management issues. If you start that way - making sure of course that your classes are copiable - you can then use pointers at the very end in the unlikely case that these tiny copies are a bottleneck.
This doesn’t work for non-copiable objects like e.g. database cursors or large items like samples.
If you really must use pointers, what are these objects? Why do they have such amorphous ownership? Isn’t there some single place that they can all live?
If these are static items that aren’t deleted and recreated, do you even need to delete them at all? Can they just be static and never deleted?