Can shared_ptr release ownership of a pointer without destroy it?