new返回是 该数据类型的指针,利用关键字delete释放
//开辟释放变量
int *p1 = new int (10);
delete p2;
//开辟释放数组
int *arr = new int[10];
delete[] arr;
new返回是 该数据类型的指针,利用关键字delete释放
//开辟释放变量
int *p1 = new int (10);
delete p2;
//开辟释放数组
int *arr = new int[10];
delete[] arr;