Check out example codes for "delete 2d dynamic array c++". It will help you in understanding the concepts better.

Code Example 1

for (int i = 0; i < numRows; i++) {
    delete [] world[i];
//    world[i] = 0;  // <- don't have to do this
}
delete [] world;  // <- because they won't exist anymore after this
world = 0;

Learn ReactJs, React Native from akashmittal.com