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: Olaf Dietsche <olaf dot dietsche--list dot gcc-patches at exmail dot de>
- Subject: Re: C++: why implicit delete in destructor?
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 01 May 2001 13:10:12 +0100
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- References: <87n18zh0p2.fsf@tigram.bogus.local>
>>>>> "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