[转载] {rodney} Re: Hi# Programming - 葵花宝典
c*e
1 楼
【 以下文字转载自 crystalike 的信箱 】
【 原文由 crystalike 所发表 】
basically think about how the compiler will generate code to
call the member function.
if the ptr type is of the class which has the non virtual function the compi
ler will generate the code which directly jump into the code segment of the
member function. static binding.
if the ptr tye is of the class which has the virtual function the compiler w
ill generate code to:
1. from the this pointer go the vtable.
2. from the vtable to call the appropr
【 原文由 crystalike 所发表 】
basically think about how the compiler will generate code to
call the member function.
if the ptr type is of the class which has the non virtual function the compi
ler will generate the code which directly jump into the code segment of the
member function. static binding.
if the ptr tye is of the class which has the virtual function the compiler w
ill generate code to:
1. from the this pointer go the vtable.
2. from the vtable to call the appropr