From 8681749432147326956
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2cda86d818184499
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-01-29 21:18:23 PST
Path: gmd.de!xlink.net!howland.reston.ans.net!news.intercon.com!udel!princeton!allegra!alice!tempel!ark
From: ark@tempel.research.att.com (Andrew Koenig)
Newsgroups: comp.std.c++
Subject: Re: new Thing() failure in ctor
Keywords: exception new delete
Message-ID: <CK9D7p.JGD@tempel.research.att.com>
Date: 26 Jan 94 22:31:01 GMT
Article-I.D.: tempel.CK9D7p.JGD
References: <hopps.759599854@mmm.com>
Organization: AT&T Bell Laboratories, Murray Hill, NJ
Lines: 12

In article <hopps.759599854@mmm.com> kjhopps@mmm.com 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
				  ark@research.att.com


