Question.1
A class manages a heap buffer with no custom copy logic:
class Buffer {
int* ptr;
public:
Buffer(int n) : ptr(new int[n]) {}
~Buffer() { delete[] ptr; }
};
Buffer a(64);
Buffer b = a; // Default shallow copyWhat happens when both a and b go out of scope?