The previous time in the software writing process encountered a problem, by the way to write, although do not know whether with the implementation of the compiler, but the constraints of their own code to write the habit is always right.
Changes of pointer values for base-class virtual function tables
The Destructors class contains virtual functions, and when a derived class object is created, the value of the virtual function table pointer is modified to point to the newly created virtual function table of the derived class when it enters the function body of the derived class constructor. When a base class destructor is called, the value of the virtual function table pointer is modified to point to the virtual function table created by the base class to prevent access to the portion of the memory (especially important) of the derived class that may be freed in the base class destructor. Once a derived object invokes a base class destructor, all base class pointers to that derived object lose polymorphism. Therefore, it is recommended to separate the functionality from the virtual function for some purpose (not destroying the object).
Values for C + + virtual function table pointers