Symphony Services Interview Question
Production EngineersCountry: India
Interview Type: In-Person
Because when a derived destructor is called, all the base destructors should also be called.
Destructor can not be overloaded because the object is going to end and there will only one to cleanup any destructor.
In case of run time overloading, when we make destructor as pure virtual we have to provide body (it may contain only open and close braces)as compiler assumes the body of virtual with respect to the by default definition provided by compiler.
Destructor can't be called explicitly.. that is you can't call destructor using object. so overloading it does not make any sense
- Antony January 05, 2012