In the following code example, does the destructor of the shared pointer delete the object that's been destructed defined by new?
auto object = std::shared_ptr<Foo>(new Foo());
I found this in some legacy code and I'm wondering if this causes memleaks or not.