title: When object variable is reassigned in C++, what happens to the original object?
body: <p>When an object variable is reassigned in C++, what happens to the original value?
  In the code below an object is created onto the stack and placed in <em>variable</em>. Then a new object is created on the stack and placed in the same variable. What happens to the original object? Does it stay on the stack until <em>variable</em> goes out of scope?</p>
  
  <pre><code>void foo() {
      ClassName variable(a, b); // variable created on the stack
      variable = ClassName(c, d); // new value for variable created on stack
      ...
  }
  </code></pre>