title: Reusing a pointer after `delete`
body: <p>Is it safe and/or good practice to do something as the following?</p>
  
  <pre><code>//NewList is a member function of a class
  void NewList(int size){
  
  delete[] list; //list is a member variable; an already initialized dynamic array.
  
  list=new ListObject[size];
  
  }
  </code></pre>
  
  <p>I'm basically discarding the previous array because I will use different data to store in the class, and hence require a new <code>list</code> to store other information on the new data. If this is not good practice, what's the alternative?</p>