(ref.doc)ark 260194

Next blh 010294 Prev: richieb 270194 Up: Usenet

From: [email protected] (Andrew Koenig)
Newsgroups: comp.std.c++
Subject: Re: new Thing() failure in ctor
Keywords: exception new delete
Date: 26 Jan 94 22:31:01 GMT
Organization: AT&T Bell Laboratories, Murray Hill, NJ

In article <[email protected]> [email protected] writes:

> To reiterate:  consider the following statement.
>     Thing* tp = new Thing;
> Suppose that the memory for Thing is allocated but the constructor for
> Thing throws an exception.  How is the memory for Thing reclaimed?

The memory should be deallocated before passing the exception on
to the calling context.
-- 
				--Andrew Koenig
				  [email protected]

automatically generated by info2www version 1.2.2.8