I don\'t get what following statement would do (specially second line)?
auto buff = std::make_unique(128); buff = std::make_unique(512)
There is no memory leak here, the assignment will deallocate the resources associated with the first allocation. Not seeing it in the debugger most likely means the relevant call was just optimised out. Try compiling with -O0 if you want to see it.
-O0