D
desktop
Why does the value of the below int pointer not disappear after using
destroy:
std::allocator<int> allo;
int* ip;
allo.construct(ip,777);
std::cout << "*ip = " << *ip << std::endl;
allo.destroy(ip);
std::cout << "*ip = " << *ip << std::endl;
I get two prints with 777.
destroy:
std::allocator<int> allo;
int* ip;
allo.construct(ip,777);
std::cout << "*ip = " << *ip << std::endl;
allo.destroy(ip);
std::cout << "*ip = " << *ip << std::endl;
I get two prints with 777.