Possible Duplicate:
Virtual functions and performance - C++
I have some class:
class I
{
public:
virtual void foo() = 0;
protected:
virtual ~I(){}
};
This class does not provide interface for instance deletion, so making destructor protected is quite logical solution. For this reason it is unnecessary to make the destructor virtual. But I have code where it is made virtual.
It doesn't look like a big mistake, but is it significantly for the code perfomance? When we create virtual function we add one more record to the virtual function table and when we make virtual call we search in this table. So it means that looking up time increases. Am I right?