3 ms·
> but theres also some known logic that you should use smart pointers to have more memory safety than raw pointers. If you follow that you'll end up with a slow
by spacechild1 4y ago
> but theres also some known logic that you should use smart pointers to have more memory safety than raw pointers. If you follow that you'll end up with a slower program.
That would be true for std::shared_ptr, but not for std::unique_ptr. You would/should only use the former if you're dealing with true shared ownership.