When creating prototype classes, I expose the destructor as such:
virtual ~MyClass();
When I finished the class in the library, I noticed that I could not add "virtual". Is this normal and virtually taken into account, or am I doing something wrong?
For instance; when I try to do this, I get a compiler error:
virtual MyClass::~MyClass() { }
Instead it works:
MyClass::~MyClass() { }
My question is that I do not need to include the virtualdestructor code in the final record, does the destructor still behave like a virtual destructor (since it is virtual as a prototype)?
anon235370
source
share