Fix the Buffer so that the copy constructor and the operator= correctly control the underlying memory.