I assume shared_ptr is used rather than unique_ptr to be able to have copies of objects from that vector and still have correct reference count for each object.
so for code:
shared_ptr<x> variable = new x;
{
vector< shared_ptr<x> > arr;
arr.push_back(x)
}
</x></x>
in the brackets variable will have ref count equal to 2, and equal to 1 otherwise.