Consider the following statament:
{Statament}
The only thing that one has to take into consideration when using non-virtual constructors is when deleting an object possibly upcasted to a base class (or some lower level ancestor).
{Eos}
In this case, the destructor of the class type known at the invocation moment of the delete operator is called instead of the destructor of the actuall class the object represents.
Am i right, wrong or there is something more about this issue?
Does the VTable get store (or at least pointers to functions) in each object created? If not, how the compiler knows to call the appropriate functions at runtime? By RTTI?
I am concerned about this because i want to make some objects really small since they are prone to memory "eating", depending on the input of my program, so i would strip all possibly parts of my objects i can find unnecessary.
Thanks! [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
{Statament}
The only thing that one has to take into consideration when using non-virtual constructors is when deleting an object possibly upcasted to a base class (or some lower level ancestor).
{Eos}
In this case, the destructor of the class type known at the invocation moment of the delete operator is called instead of the destructor of the actuall class the object represents.
Am i right, wrong or there is something more about this issue?
Does the VTable get store (or at least pointers to functions) in each object created? If not, how the compiler knows to call the appropriate functions at runtime? By RTTI?
I am concerned about this because i want to make some objects really small since they are prone to memory "eating", depending on the input of my program, so i would strip all possibly parts of my objects i can find unnecessary.
Thanks! [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro