Re: not-so-smart with pointers
Smart pointers are about communicating something to the reader.
std::unique_ptr<Foo> foo ; // I own this, I can move ownership but I cant (share/copy), lifetime is as mine.
std::shared_ptr<Foo> foo; // I have an interest in this, it might outlive me, but my share keeps it alive.
std::weak_ptr<Foo> foo; // I have an interest in this, but my interest doesn't keep it alive.
Foo * foo; // a wild pointer, set to whatever what on the stack last.