If you delete
derived classes via pointers to base classes then the behavior will be undefined without a virtual destructor, no matter how the derived classes look.
C++11 Standard, §5.3.5/3:
If the static type of the object to be deleted is different from its dynamic type, the static type shall be a base class of the dynamic type of the object to be deleted and the static type shall have a virtual destructor or the behavior is undefined.
However, if the classes differ only in their constructor, consider using alternatives to derivation, e.g. simple free functions like create_named_file()
.