title: C++ array of strings destructor
body: <p>i have a simple class with string pointer and size integer. Its constructor sets the size to 0 and the pointer to new string[0]; When I try to destruct the string* with delete[] the program crashes.</p>
  
  <pre><code>#include&lt;string&gt;
  using std::string;
  class Strarr {
  private:
      string *items;
      int size;
  public:
      Strarr() {
          items = new string[0];
          size = 0;
      }
      ~Strarr() {
          delete[] items;
      }
  };
  int main() {
      Strarr test;
      test.~Strarr();
  }
  </code></pre>
  
  <p>Can someone please explain what is happening here?</p>