Re: Base struct instead of class
"White Wolf" <wolof@freemail .hu> wrote in message news:bjenr4$o7t $1@phys-news1.kolumbus. fi...
[color=blue]
> First: *all* of your classes *must* have a virtual destructor. They all
> have virtual functions. Especially hashable and runnable *must* have
> virtual destructors.[/color]
Not necessarily true. Do not confuse "rules of thumb" with the MUST rules
of the language. The only time you need a virtual destructor is when derived
classes are deleted through pointers of their base types.
"White Wolf" <wolof@freemail .hu> wrote in message news:bjenr4$o7t $1@phys-news1.kolumbus. fi...
[color=blue]
> First: *all* of your classes *must* have a virtual destructor. They all
> have virtual functions. Especially hashable and runnable *must* have
> virtual destructors.[/color]
Not necessarily true. Do not confuse "rules of thumb" with the MUST rules
of the language. The only time you need a virtual destructor is when derived
classes are deleted through pointers of their base types.
Comment