title: error in class destructor
body: <p>I just started my container class and already I'm having issues:</p>
  
  <pre><code>class Container
  {
      private:
  
      string* BasePointer; // The starting pointer.
      unsigned int Capacity; // The number of values the container can hold.
  
      public:
  
      Container() // Default constructor.
      {
          Capacity = 1;
          BasePointer = new string[Capacity];
      }
  
      ~Container() // Destructor.
      {
          delete BasePointer; // Delete the container to prevent memory leaking.
      }
  };
  </code></pre>
  
  <p>I get the error <code>Container Classes(26467) malloc: *** error for object 0x100100088: pointer being freed was not allocated</code>.  What am I doing incorrectly?</p>