[Solved] Does std::make_shared(new Foo()) create singletons?
No, std::make_shared<Foo>() will always create a new Foo object and return the managed pointer to it. The difference to unique_ptr is, that you can have multiple references to your pointer, while unique_ptr has only one living reference to your object. auto x = std::make_shared<Foo>(); auto y = x; // y and x point to the … Read more