C++: why implicit delete in destructor?

Jason Merrill jason_merrill@redhat.com
Tue May 1 05:10:00 GMT 2001


>>>>> "Olaf" == Olaf Dietsche <olaf.dietsche--list.gcc-patches@exmail.de> writes:

> why is there a call to (__builtin_)delete in every destructor?

Because for virtual destructors, if the dynamic type of the class defines
operator delete, we need to use that instead of the global one.

For non-virtual destructors, as of 3.0 we won't call delete from the
destructor.

Jason



More information about the Gcc mailing list