Friday 24 February 2012

On implementing a destructor, is there any need for the explicit calling of the destructors for member objects? | C++

No, there is no need to call the destructor explicitly. A destructor of a class, whether you explicitly define one or not, invokes a destructor automatically for its member objects. Their destruction is done in the reverse order of their declaration in the class.
Example:
PROGRAM