From -1099755707357790874
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2cda86d818184499
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-01-31 15:59:43 PST
Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!koriel!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!engnews1.Eng.Sun.COM!cygany!ball
From: ball@cygany.Eng.Sun.COM (Mike Ball)
Newsgroups: comp.std.c++
Subject: Re: new Thing() failure in ctor
Date: 31 Jan 1994 23:59:43 GMT
Organization: Sun Microsystems, Inc.
Lines: 34
Distribution: world
Message-ID: <2ik61f$q5v@engnews1.Eng.Sun.COM>
References: <2ig88p$7it@news.delphi.com>
Reply-To: ball@cygany.Eng.Sun.COM
NNTP-Posting-Host: cygany.eng.sun.com

In article 7it@news.delphi.com, bobkf@news.delphi.com (BOBKF@DELPHI.COM) writes:
> Locating the appropriate operator delete is more interesting, but it's
> analogous to managing a vtable, only for a single object. If a class has no
> operator delete, the system operator is used. The behavior if a class hides
> operator delete is, like most of this, undefined at the moment, but the
> state is discoverable, which is all that matters.
> 
> If you don't find this constructive (pun intended) proof convincing, you
> can always examine the compilers that (I'm told) already implement it.

I have yet to discover one of these implementations that I can't screw up
with some "reasonable" form of allocation and deletion.

Unfortunately, there are cases where only the mind of the programmer knows
what to do.

I also have problems with your suggested implementation in that it adds considerable
costs for every operator new, whether exceptions during the constructor are
possible or not.

This IS an important question.  We can't always get the answer we like, and we
may have to accept something less than beautiful.  I don't consider the current
answers provide adequate guidance for an implementation.  For one thing, the
current answers are all at the implementation level rather than at the language
level.  What happens to storage in what situation is beyond the scope of the
standard, which can only state what routines are called.

Please don't pretend that this is solved, and it's only the stubborn compiler
vendors who are dragging their feet.  Keep working on it and come up with a
real, language-level spec which can be part of the standard.

-Mike Ball-




