title: Deleting an Object in c++ implies deletion of its members?
body: <p>I am quite new to c++ and I have a question.</p>
  
  <p>If I have a class containing a (pointer to a) vector:</p>
  
  <pre><code>class myClass {
  public:
      int* direction;
      myClass(int d){direction=new int[d];}
  }
  </code></pre>
  
  <p>When I create an object and delete it in the main:</p>
  
  <pre><code>int main(){
      int d;
      myClass* myvec;
      myvec = new myClass(d);
      delete myvec;
  }
  </code></pre>
  
  <p>Also the destructor for myvec->direction has been coherently called and the memory freed? Or do I have to write an apposite method for that?</p>
  
  <p>I hope the question is clear...</p>