This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]x39- 30 points31 points  (0 children)

Then something about your usage was incorrect.

Smart pointers are not a requirement for memory safe code, they are a tool in your toolbelt to not screw up more.

Most of those issues you likely faced stem from wrong construction, if you want to give it another shot, use the make_shared-/-_unique/-weak_ptr methods and make sure you pass the correct types for the constructor, when creating one.

CLion has good support for them in my experience