I don\'t get what following statement would do (specially second line)?
auto buff = std::make_unique(128); buff = std::make_unique(512)
Move assignment operator is called, which does
if (this != &_Right) { // different, do the swap reset(_Right.release()); this->get_deleter() = _STD move(_Right.get_deleter()); }
No leak here, as it does reset, which will deallocate.