This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++: why implicit delete in destructor?
- To: jason_merrill at redhat dot com (Jason Merrill)
- Subject: Re: C++: why implicit delete in destructor?
- From: Mike Harrold <mharrold at cas dot org>
- Date: Tue, 1 May 2001 09:36:57 -0400 (EDT)
- Cc: olaf dot dietsche--list dot gcc-patches at exmail dot de (Olaf Dietsche), gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
>
> >>>>> "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