T
Tim Clacy
Having come across a few NonCopyable classes, I just wondered why they don't
have virtual destructors. Doesn't this limit there usefulness? In fact,
there seem a whole bunch of generic classes in Boost, for instance, that
don't have virtual destructors but that do expose public constructors.
Aren't these a recipe for disaster?
Boost has an 'abstract' class that simply defines a virtual destructor; is
the idea that the programmer tags this on the end of the inheritence list if
they want to be able to 'delete' through a base class pointer?
have virtual destructors. Doesn't this limit there usefulness? In fact,
there seem a whole bunch of generic classes in Boost, for instance, that
don't have virtual destructors but that do expose public constructors.
Aren't these a recipe for disaster?
Boost has an 'abstract' class that simply defines a virtual destructor; is
the idea that the programmer tags this on the end of the inheritence list if
they want to be able to 'delete' through a base class pointer?