R
Rene
I keep reading about this vTables and it's killing me because I am not sure
what they are. I have a feeling that vTables are used when you override
virtual methods or properties but I really have no idea. Below is an
explanation of what I *think* vTables are. Please consider the following two
classes:
class BaseClass
{
public virtual void MyVirtualFunctio() {}
}
class MainClass : BaseClass
{
public override void MyVirtualFunctio() {}
}
My guess is that the compiler will create a virtual table where the adress
of the function "MyVirtualFunctio" on "BaseClass" will be rerouted to the
"MyVirtualFunctio" on "MainClass".
Is this what vTables are? I know that it does't really matter if I don't
know what a vTable are and how they work since there is nothing I can do
about them but I was just curions if someone could share some links to where
this concept is explained in more detail.
Thanks.
what they are. I have a feeling that vTables are used when you override
virtual methods or properties but I really have no idea. Below is an
explanation of what I *think* vTables are. Please consider the following two
classes:
class BaseClass
{
public virtual void MyVirtualFunctio() {}
}
class MainClass : BaseClass
{
public override void MyVirtualFunctio() {}
}
My guess is that the compiler will create a virtual table where the adress
of the function "MyVirtualFunctio" on "BaseClass" will be rerouted to the
"MyVirtualFunctio" on "MainClass".
Is this what vTables are? I know that it does't really matter if I don't
know what a vTable are and how they work since there is nothing I can do
about them but I was just curions if someone could share some links to where
this concept is explained in more detail.
Thanks.