The Old New Thing

When should your destructor be virtual?

When should your C++ object's destructor be virtual? First of all, what does it mean to have a virtual destructor? Well, what does it mean to have a virtual method? If a method is virtual, then calling the method on an object always invokes the method as implemented by the most heavily derived class. If the method is not virtual, then the ...

Batman and Robin patrolling Whitley

Batman and Robin have been spotted in Whitley, providing valuable services like rescuing damsels in distress (pushing her car to the nearest petrol station), scaring away potential muggers, and even chasing streakers off a football pitch...