calling destructors

Jason Merrill jason at cygnus.com
Thu Aug 19 11:28:46 UTC 1999


The summary for C-5 questions the usefulness of calling op delete from the
destructor.  But it's required by the language, in case the derived class
defines its own op delete.  This only applies to virtual dtors, of course.

One option would be to have two dtor slots, one which performs deletion and
one which doesn't.  The advantage of this sort of approach would be
avoiding pulling in all the memory management code if you never actually
touch the heap.

Microsoft has a patent on this device, but the old Sun ABI also talks about
it, which seems to qualify as prior art.

Jason




More information about the cxx-abi-dev mailing list