<<< Pure virtual functions | Index | Virtual destructors >>> |
Compilers are free to implement virtual functions as they see fit.
Generally, implementation is done with:
static tables of function pointers in each class with virtual functions,
and a vtbl pointer in each object.
Thus, an object of a class with virtual functions may have an unusual size.
Calling virtual functions requires a bit more time
(but is still faster than faking it!)
<<< Pure virtual functions | Index | Virtual destructors >>> |