Can some one please help what the order of destruction is when I am using virtual functions. Does it start with the base class and then derived class?
Order of destructions if from the bottom up. (from derived to base)
Short answer: the exact opposite of the constructor order.
Long answer: suppose the "most derived" class is D, meaning the actual object that was originally created was of class D, and that D inherits multiply (and non-virtually) from B1 and B2. The sub-object corresponding to most-derived class D runs first, followed by the dtors for its non-virtual base classes in reverse declaration-order. Thus the destructor order will be D, B2, B1. This rule is applied recursively; for example, if B1 inherits from B1a and B1b, and B2 inherits from B2a and B2b, the final order is D, B2, B2b, B2a, B1, B1b, B1a.
See the c++ faq section 25