Mail Archives: cygwin/1997/09/07/00:42:48
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 AT geocities DOT com
>http://www.geocities.com/SiliconValley/Lakes/5657
>
--------
Vladimir Belkin (vladimir DOT belkin AT usa DOT net)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -