[K42-discussion] virtual destructors

Donour Sizemore donour at cs.unm.edu
Tue Jul 11 07:35:24 EST 2006


Bryan S Rosenburg wrote:
>
> We shouldn't be calling delete on any class that doesn't use the 
> DEFINE_NEW machinery.  Can you tell what actual delete is causing the 
> undefined symbol? 
The delete ( operator delete(void*) ) symbol is introduced when adding 
virtual destructors to classes that didn't previously have them.  On the 
more general matter of classes with virtual functions but no virtual 
destructor, and after careful reading, I don't think that this is 
actually illegal. However, gcc 4+ will issue a warning about it. At the 
moment, I've simply turned off -Werror and am dealing with more serious 
errors. What is the feeling about adding destructors and thus delete 
operators that don't actually do anything?

donour
 



More information about the K42-discussion mailing list