View All num of num See all Photos Yahoo www.yahoo.com Engaged Employer Overview Reviews Salaries Interviews Jobs Photos Benefits 2.0k Reviews 5.7k Salaries 621 Interviews Follow Add Review or Salary Follow Add Review or Salary Interview Question Technical Yahoo Interview Santa Clara, CA Yahoo Why do we need virtual destructor in c++ Tags: See more , See less 8 Answer Add Tags Answer Interview Answer 1 Answer ▲ 0 ▼ When we destroy objects of derived classes, the derived class's dtor is called first, then the base class's dtor. But the derived dtor may free/destroy members from the base class. This is a problem when the base class's dtor is called. Making the base class's dtor virtual, prevents the base class dtor from being called, assuming that the derived class has defined it's own dtor. General rule, is if you have a class inherit from another, make the base class virtual. saltab on Nov 8, 2013 Interviews > Technical Yahoo > Yahoo Add Answers or Comments To comment on this, Sign In or Sign Up.