From: belkin@minas.rosmail.com (Vladimir belkin)
Subject: Re: g++ exception handling bug
7 Sep 1997 00:42:48 -0700
Approved: cygnus.gnu-win32@cygnus.com
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" <hfernandes@mail.geocities.com>
Original-Cc: gnu-win32@cygnus.com
In-Reply-To: <199709050057.RAA04230@geocities.com>
Original-Sender: owner-gnu-win32@cygnus.com


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
>hfernandes@geocities.com
>http://www.geocities.com/SiliconValley/Lakes/5657
>
--------
  Vladimir Belkin (vladimir.belkin@usa.net)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
