What is a destructor and how can we overload it?
Show answer and explanation
A destructor ends an object's lifetime and releases resources owned by it. A class can have only one destructor, so destructors cannot be overloaded; it may be virtual, defaulted, deleted, or given an exception specification.
A destructor ends an object's lifetime and releases resources owned by it. A class can have only one destructor, so destructors cannot be overloaded; it may be virtual, defaulted, deleted, or given an exception specification.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.