- 论坛徽章:
- 1
|
[quote] <<Inside the C++ Object Model>> How might the table containing the virtual function addresses be constructed? In C++, the set of virtual functions capable of being invoked through an object of its class is known at compile time. Moreover, this set is invariant. It cannot be added to nor can a virtual instance be replaced at runtime. The table, therefore, serves only as a passive repository. Since neither its size nor its contents change during program execution, its construction and access can be completely handled by the compiler. No runtime intervention is necessary.
Having the address available at runtime, however, is only half the solution. The other half is finding the address. [/quote] |
|