title: cannot delete std::vector & std::array?
body: <p>My C++ class has a destructor that tries to delete std::vector and std::array instance variables.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;array&gt;
  
  int main()
  {
      std::array&lt;int, 3&gt; foo;
      std::vector&lt; std::array&lt;float, 4&gt; &gt; vertices;
  
      foo[0] = 1;
      foo[1] = 2;
      foo[2] = 3;
      std::cout &lt;&lt; foo[0] &lt;&lt; std::endl;
      delete foo;
      delete vertices;
  
      return 0;
  }
  </code></pre>
  
  <p>I'm not sure how to properly free up the memory - how come I can't delete those variables?</p>
  
  <pre><code>clang++ -std=c++11 -stdlib=libc++ -Weverything ccc.cpp 
  ccc.cpp:14:2: error: cannot delete expression of type 'std::array&lt;int, 3&gt;'
          delete foo;
          ^      ~~~
  ccc.cpp:15:2: error: cannot delete expression of type 'std::vector&lt;std::array&lt;float, 4&gt;
        &gt;'
          delete vertices;
          ^      ~~~~~~~~
  ccc.cpp:18:2: warning: C++98 requires newline at end of file [-Wc++98-compat-pedantic]
  }
   ^
  </code></pre>