This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: g++ exception handling bug



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


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