I'm studying C++ and read the following:
When an object is destroyed, its destructor first executes the destructor's body, and then >calls the destructors of all of the members. Member destructors are called in reverse order of creation
But why is this correct? the programmer is the one who writes the destructor, so he could write it in any order he wants to which probably may be different than what is mentioned above.