This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++: why implicit delete in destructor?


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]