#include <iostream>
using namespace std;
int main()
{
int* A = new int[2];
A[0] = 10000;
A[1] = 2;
int*B = A;
delete B;
cout << B << A;
}
I found the code above, delete B;
removes the data of array A. Can we remove allocated memory by free some another assigned pointer?