13.1.4. The Rule of Three/Five
As we’ve seen, there are three basic operations to control copies of class objects: the copy constructor, copy-assignment operator, and destructor. Moreover, as we’ll see in § 13.6 (p. 531), under the new standard, a class can also define a move constructor and move-assignment operator.
Exercise 13.9: What is a destructor? What does the synthesized destructor do? When is a destructor synthesized?
Exercise 13.10: What happens when a
StrBlob object is destroyed? What about a
Exercise 13.11: Add a destructor to your
HasPtr class from the previous exercises.
Exercise 13.12: How ...