I''m going back to my originial stance that you do not need to declare the base classes dtor virtual even when you call delete on it.
I did some research(with my friend''s insperation) and I found this quote in Bjarne Stroustrup''s book "The C++ Programming Language Special Edition"
quote:
page 423 Section 15.6
In other words, if you want to supply an allocator/deallocator pair that works correctly for derived classes, you must either supply a virtual destructor in the base class or refrain from using the size_t arguement in the deallocator. Naturally, the language could have been designed to save you from such concerns. Howeever, that can be done only by also "saving" you from the benefits of the optimizations possible in the less safe system.
What Stroustrup is saying is that you do not have to declare the base virtual and he left it out for people who know how to manage their memory properly and no how to deallocate memory. As Sabreman so elequently said
quote:
Sabreman
"Usually because defining the behaviour would force some implementations to utilise inefficient mechanisms for realising the behaviour. C++ sacrifices all manner of sanity at the altar of performance."
The C++ language was built to be high performance and it was built to allow you to manage your own memory that is why you have the option of declaring your base dtor to be virtual or not.
error 500