[omniORB] non-virtual destructors
Stefan Seefeld
seefelds@MAGELLAN.UMontreal.CA
Thu, 16 Mar 2000 09:42:32 -0500
David Riddoch wrote:
> No. This is perfectly legal c++ code, and in my opinion the compiler
> should not issue a warning. These objects are only ever 'delete'd through
> a pointer to the most derived type -- so we are sure to call the correct
> destructor. The behaviour with virtual destructors is identical, but has
> a space and time cost.
did you measure this ? The space 'overhead' should be one pointer per
vtbl, i.e. per class. This isn't worth mentioning, is it ? Time overhead
depends largely how frequent these objects are destructed.
Stefan
_______________________________________________________
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca
_______________________________________________________
...ich hab' noch einen Koffer in Berlin...