title: Do i need to delete a object that was constructed with new and placement
body: <pre><code>class Foo{
  //some member
      public:
      int bar;
  }
  
  int main(){
      char* buffer = new char[100];
      Foo* f = new(buffer)Foo();
  //do i have to
      delete f;
  //or is 
      delete[] buffer;
  //enough
  }
  </code></pre>
  
  <p>Sure i have to delete it if the delete of <code>Foo</code> has some major effect on the system but lets say it is a simple storage object which i place which is compleatly inside of the buffer and has no deconstructor which does delete some other things.</p>
  
  <ul>
  <li>Do i have to delete a object which where places with the new inside
  of a buffer or is it enough to delete the buffer?</li>
  <li>If i have to call delete on every object inside of the buffer, why do
  i have todo this?</li>
  </ul>
  
  <p>I read: <a href="https://stackoverflow.com/questions/222557/what-uses-are-there-for-placement-new">what-uses-are-there-for-placement-new</a> and he also says </p>
  
  <blockquote>
    <p>You should not deallocate every object that is using the memory buffer. Instead you should delete[] only the original buffer.</p>
  </blockquote>