G
Guest
Hi,
I was wondering if anyone has any information on the performance impact of
using functions declared as overridable?
To Explain more fully; By default every function created in VB is NOT
declared as overridable. However 90% of the time when creating resuable
components/classes you don't care if the target programmer overrides the item
or not.
However, if you are the target programmer and wish to alter the behviour of
a class in a polymorphic manner and the creator of the class has not declared
the function/property/procedure as overridable then you are stuck with
shadowing the original code... which of course will not operate correctly
(with respect to polymorphism).
So is there any performace reasons (memory/CPU) considerations for not
declaring all of the procedures/functions in a Class as overridable?
Regards,
Myles
I was wondering if anyone has any information on the performance impact of
using functions declared as overridable?
To Explain more fully; By default every function created in VB is NOT
declared as overridable. However 90% of the time when creating resuable
components/classes you don't care if the target programmer overrides the item
or not.
However, if you are the target programmer and wish to alter the behviour of
a class in a polymorphic manner and the creator of the class has not declared
the function/property/procedure as overridable then you are stuck with
shadowing the original code... which of course will not operate correctly
(with respect to polymorphism).
So is there any performace reasons (memory/CPU) considerations for not
declaring all of the procedures/functions in a Class as overridable?
Regards,
Myles