If you declare an object on the stack as in your case, it is destroyed automatically when going out of scope.
As already noted at your other question, you should pass it by reference to avoid creating a copy.
So it should be:
{
const std::vector<int> arr = {1, 2, 3};
doSomething(arr);
}
void doSomething(const std::vector<int>& arr)
{
}
If you pass the array by value:
void doSomething(const std::vector<int> arr)
{
}