title: Is it necessary to null your pointers after deleting multidimensional dynamic array
body: <p>I'm Trying To avoid memory lack and I need to understand if I need to set <code>nullpointer</code> to my
  Multidimensional dynamic array after deleting an array. Here is my code.</p>
  <pre><code>int*** arr = new int** [lists];
  
  for (int i = 0; i &lt; lists; i++)
  {
      arr[i] = new int* [row];
      for (int r = 0; r &lt; row; r++)
      {
          arr[i][r] = new int[col];
      }
  }
  for (int i = 0; i &lt; lists; i++)
  {
     
      for (int r = 0; r &lt; row; r++)
      {
          for (int z = 0; z &lt; col; z++)
          {
              arr[i][r][z] = rand() % 100;
          }
  
  
      }
  }
  for (int i = 0; i &lt; lists; i++)
  {
  
      for (int r = 0; r &lt; row; r++)
      {
          delete[] arr[i][r];
  
          
      }
      
      delete[] arr[i];
  }
  delete[] arr;
  arr = nullptr;
  </code></pre>