#include <iostream>
#include <string.h>
using namespace std;

class A
{
	public:
	char *token = new char[10];
	A()
	{
		strcpy(token, "hello");
	}
	~A()
	{
		if(token != NULL)
		{
			delete[] token;
			token = NULL;
		}
		cout<<"destroyed"<<endl;
	}
};
int main() {
	A a;
	if(1)
	{
		A b = a;
		cout<<b.token<<endl;
	}
	cout<<a.token<<endl;
	cout<<"End";
}