🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1634

Re: Operator new Question

#1634
From: Harald M. Mueller
Date: Mon, 07 Aug 1995 07:34
25 lines
1276 bytes
In article <3vu7te$ql4@engnews2.Eng.Sun.COM>, clamage@Eng.Sun.COM (Steve Clamage) writes:
|>
|>The results of using "delete" on a pointer value obtained from a placement-
|>new are undefined. Any result is allowed. It is invalid C++, but no
|>diagnostic is required.
|>---
|>Steve Clamage, stephen.clamage@eng.sun.com
|>

Panic! Then you couldn't even write

	T* p2 = new(nothrow()) T;	// this is from the draft standard, 18.4.1.1,1
	...
	delete p2;			// should certainly be ok?!?!?!?!?!?!

Is this really so?

HMMueller

== --------------------------------------------------------------
== Dr. Harald M. Mueller	mueller@garwein.hai.siemens.co.at
== Siemens AG Austria		Siemens AG Oesterreich
== PSE EZE TNA1			Erdberger Laende 26
== fax: +43-1-71711-5425	A-1030 Vienna/Austria
== --------------------------------------------------------------
Technical Details
Message-ID: <404flq$st@siemens.co.at>
Path: arc1-ca.pugleaf.net!siemens.co.at!usenet
References: <3vu7te$ql4@engnews2.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!siemens.co.at!usenet
From: mueller@garwein.hai.siemens.co.at (Harald M. Mueller)
Newsgroups: comp.std.c++
Subject: Re: Operator new Question
Date: 7 Aug 1995 07:34:18 GMT
Organization: Siemens Austria PSE EZE TNA1
Message-ID: <404flq$st@siemens.co.at>
References: <3vu7te$ql4@engnews2.Eng.Sun.COM>
Reply-To: mueller@garwein.hai.siemens.co.at
NNTP-Posting-Host: garwein.hai.siemens-austria