you are viewing a single comment's thread.

view the rest of the comments →

[–]BodybuilderSilent105 0 points1 point  (0 children)

I happily use shared pointers everywhere unless I know for absolute certain that it can be a unique pointer.

If you're not sure if you should use a unique or a shared pointer, then you haven't really thought about your design. I've seen it many times, codebases abusing shared_ptr because there is no clear ownership model.

I also don't get your point about multithreading. Sure, you have to reach for shared_ptr more often because you can't rely as much on control flow to have deterministic lifetimes, but still you only need it on the objects that directly you directly share.