If I have a unnamed unique_ptr object, holding a object Foo, why will the object not be deleted when it is added to a vector?
Example:
vec.push_back(std::unique_ptr<Foo>(new Foo())));
Why would Foo not be deleted? I've attempted to implement this but I can't seem to figure this out, as I delete the object in the destructor.