Subject: Re: g++ exception handling bug
From: [email-masked] (Vladimir belkin)

7 Sep 1997 00:42:48 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <3.0.1.32.19970905131703.00920830.cygnus.gnu-win32@localhost>
References: <3.0.1.32.19970901233509.0092a2e0@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: belkin@localhost
X-Mailer: Windows Eudora Light Version 3.0.1 (32)
Original-To: "Hilton Fernandes" <[email-masked]>
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]>
Original-Sender: [email-masked]

My understanding is right. BC++ and VC++ already have implemented this 
facility. See C++ standard draft:

------- Part of C++ standard draft (exception handling related part) ---
  If the  object  or   array  was  allocated  in a new-expression and the 
  new-expression does not   contain   a    new-placement,    the     
  deallocation    function 
  (_basic.stc.dynamic.deallocation_, _class.free_) is called to free the
  storage occupied by the object; the deallocation function is chosen as
  specified  in  _expr.new_.   If the object or array was allocated in a
  new-expression and the new-expression contains  a  new-placement,  the
  storage  occupied  by the object is deallocated only if an appropriate
  placement operator delete is found, as specified in _expr.new_.
--------------- -------------------------------------------------------

-----------------------------------------------------------------------
At 21:55 04.09.97 +0000, you wrote:
>Hi!
>
>I'm well aware g++ has bugs in its exception handling.  However, in
>your example i can't see a bug.  I suppose the delete operator
>should be called only when explicitly invoked.  
>
>Maybe you misunderstood a thing: destructors are called whenever a
>constructor is called.  So, a call to a call to a constructor does
>imply a call to 
>
>However, a new (dynamic memory allocation + construction) call
>doesn't imply a call to delete (destruction + dynamic memory
>release).
>
>
>Best regards,
>++Hilton
>----
>Hilton Fernandes
>[email-masked]
>http://www.geocities.com/SiliconValley/Lakes/5657
>
--------
  Vladimir Belkin ([email-masked])
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".