title: What all should be deleted in the destructor of a class
body: <p>So it's been a while since I've done any c++ coding and I was just wondering which variables in a basic linked list should be deleted in the destructor and unfortunately I can't consult my c++ handbook at the moment regarding the matter. The linked list class looks as follows:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;vector&gt;
  
  class Node
  {
      Node *next;
      string sName;
      vector&lt;char&gt; cvStuff;
  
      Node(string _s, int _i)
      {
          next = nullptr;
          sName = _s;
  
          for (int i = 0; i &lt; _i; i++)
          {
              cvStuff.insert(cvStuff.end(), '_');
          }
      }
  
      ~Node()
      {
           //since sName is assigned during runtime do I delete?
           //same for cvStuff?
      }
  };
  </code></pre>
  
  <p>I'm also curious, if  in the destructor I call</p>
  
  <pre><code>delete next;
  </code></pre>
  
  <p>will that go to the next node of the linked list and delete that node and thus kind of recursively delete the entire list from that point? Also, if that is the case and I choose for some reason to implement that, would I have to check if next is nullptr before deleting it or would it not make a difference?</p>
  
  <p>Thank you.</p>