The code below works fine, so you'll have to show more of your code to see what you are doing wrong.
By the way, do you know when your program crashes at run time? Is it after or during the delete. If it is after, it is quite possible that you are trying to use the pointer that you deleted after you delete it.
const int arraySize = 5;
for (int i=0; i < arraySize; i++)
MyPtrArray[i] = new int(i);
MyPtrArray = 0; // Set to null after delete.
for (int j=0; j < arraySize; j++)