When an object gets destroyed, the destructors of all full constructed [sub-]objects get called (the issue about full construction is important when throwing an exception during construction; once construction completed, all subjects and the object itself will be destroyed). That is, each class just looks after its own resources and leaves destruction of its subobjects to their respective destructors.
In addition being very precise about which destructors are called, the language is also very precise about the order: destructors are called in exactly the reverse order the constructors are called. That is, the Parent
class destructor is called after the Child
class destructor and all of the destructors of Child
's members are completed.