"Ram" <ra******@yahoo.comwrites:
All of this is implementation dependent, though as far as I know they
don't vary too much as far as you're questions are concerned.
1. Virtual functions addresses are stored in Virtual table, but how about
the Virtual destructor?
At least on my platform, there is technically more than one dtor, two
of them virtual, one of them not. Don't ask me why.
2. Is the Virtual destructor also treated as just like any other function
except the calling mechanism?
As little as ctors are normal non-virtual functions.
3. Could you please refer me a book/Website where I can find the detailed
information about the Virtual function and internal details.? What happens
at the compile time and Run time in detail?
One unfortunately very outdated and also somewhat superficial book
which is often cited when such questions come up is `Inside the C++
object model'.
I would nevertheless suggest it as a starting point, if you have
access to it.
Since it's platform dependent, you might find it documented for your
platform. For example, gcc adheres to the Itanium C++ ABI (google for
itanium and abi), even on systems other than Itanium, and Linux
systems are required that their compiler do so by LSB.
This document is a bit difficult to understand if you're not familiar
with the basics though (admittedly I don't understand too much).
It's still useful to realise _how_ complex matters are.
--
Cheers, Jens