C++: why implicit delete in destructor?
Mike Harrold
mharrold@cas.org
Tue May 1 06:37: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
>
I guess the question is why these are in the destructor?
/Mike
More information about the Gcc
mailing list