Reassign unique_ptr object with make_unique statements - Memory leak? : <p>I don't get what following statement would do (specially second line)?</p>

<pre><code>auto buff = std::make_unique&lt;int[]&gt;(128);
buff = std::make_unique&lt;int[]&gt;(512);
</code></pre>

<p>Will the second call to <code>make_unique</code> followed by assignment operator will de-allocate memory allocated by first call, or will there be memory leak? Must I have to use <code>buff.reset(new int[512]);</code> ?</p>

<p>I've debugged it, but didn't find any <code>operator=</code> being called, nor any destructor be invoked (by <code>unique_ptr</code>).</p>
