title: Why do we need to set rvalue reference to null in move constructor?
body: <pre><code>//code from https://skillsmatter.com/skillscasts/2188-move-semanticsperfect-forwarding-and-rvalue-references
  class Widget {
  public:
      Widget(Widget&amp;&amp; rhs)
          : pds(rhs.pds) // take source’s value
      { 
          rhs.pds = nullptr;  // why??
      }
  
  private:
      struct DataStructure;
      DataStructure *pds;
  };
  </code></pre>
  
  <p>I can't understand the reason for setting <code>rhd.pds</code> to <code>nullptr</code> .</p>
  
  <p>What will happen if we remove this line : <code>rhs.pds = nullptr;</code></p>