Question: In Figure C 10.11, consider calls to virtual methods declared in A, but called through a B, C, or D object view. We could avoid
In Figure C 10.11, consider calls to virtual methods declared in A, but called through a B, C, or D object view. We could avoid one level of indirection by appending a copy of the A part of the vtable to the D/B and C parts of the vtable (with suitably adjusted this corrections). Give calling sequences for this alternative implementation. In the worst case, howmuch larger may the vtable be for a class with n ancestors?
Step by Step Solution
3.42 Rating (161 Votes )
There are 3 Steps involved in it
In this alternative implementation the vtable for a class with n ancestors may be up to n times larg... View full answer
Get step-by-step solutions from verified subject matter experts
