Walkins Openings in India & Interview Questions

Walkins in Mumbai, Bangalore, Chennai, Delhi, Gurgaon, Pune


What is the order of destructors called in a polymorphism hierarchy? 

Destructors are called in reverse order of constructors. First destructor of most derived class is called followed by its parent’s destructor and so on till the topmost class in the hierarchy.
You don’t have control over when the first destructor will be called, since it is determined by the garbage collector. Sometime after the object goes out of scope GC calls the destructor, then its parent’s destructor and so on.
When a program terminates definitely all object’s destructors are called.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google


If you liked this question/asnwer, make sure you
Subscribe to Walkins Openings in India & Interview Questions RSS feed!





  • Subscribe

      Get Latest Walkins in your INBOX, enter your email address:


  • Walkins by Location


  • Walkins by Skills