#include <vector>
#include <memory>
#include <iostream>
struct State
{
~State() { std::cout << " state destructor " << std::endl; }
};
int main()
{
std::vector<std::unique_ptr<State>> mStates;
mStates.push_back(std::unique_ptr<State>(new State()));
mStates.pop_back();
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPG1lbW9yeT4KI2luY2x1ZGUgPGlvc3RyZWFtPgogCnN0cnVjdCBTdGF0ZQp7CiAgIH5TdGF0ZSgpIHsgc3RkOjpjb3V0IDw8ICIgc3RhdGUgZGVzdHJ1Y3RvciAiIDw8IHN0ZDo6ZW5kbDsgfQp9OwogCmludCBtYWluKCkKewogICBzdGQ6OnZlY3RvcjxzdGQ6OnVuaXF1ZV9wdHI8U3RhdGU+PiBtU3RhdGVzOwogICBtU3RhdGVzLnB1c2hfYmFjayhzdGQ6OnVuaXF1ZV9wdHI8U3RhdGU+KG5ldyBTdGF0ZSgpKSk7CiAgIG1TdGF0ZXMucG9wX2JhY2soKTsKfQ==