Original Post
Ive tried this q in the beginner pool but cant get an answer.
If I use this code for my 2d array, is this the correct way to deallocate the array?
alloc
int **Map;
Map = new int*[ARRAY_WIDTH];
for (int i = 0; i < ARRAY_WIDTH; i++)
Map[ i ] = new int[ARRAY_HEIGHT];
dealloc
for (unsigned int i = 0; i < ARRAY_WIDTH; i++)
{
delete [] Map[i];
}
delete [] Map;
