Question OOP-CTOR-0017
HardWhat is the risk of a shallow copy for a class that owns a raw pointer to heap memory?
- A.
The copy uses less memory
- B.
Both copies point to the same memory, so both destructors free it (double free)
- C.
Sign up free to see the answer and a step-by-step explanation.