The body of a destructor is executed before the destructors for member objects. Destructors for nonstatic member objects are executed before the destructors for base classes. Destructors for nonvirtual base classes are executed before destructors for virtual base classes. Destructors for nonvirtual base classes are executed in reverse order of their declaration in the derived class. Destructors for virtual base classes are executed in the reverse order of their appearance in a depth-first left-to-right traversal of the directed acyclic graph of base classes; “left-to-right” is the order of appearance of the base class names in the declaration of the derived class.
Q: How many C++ programmers does it take to change a light bulb?
A: You’re still thinking procedurally. A properly designed light bulb object would inherit a change method from a generic light bulb class, so all you would have to do is send a light-bulb-change message.
Q: How long does it take a programmer to change a lightbulb?
A: As long as it takes him to completely redesign & rebuild the whole building so that changing a lightbulb is consistent and user-friendly, has an API, and can be done automatically via a command line option.