From 116606025014728750
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccfd547ab8587b55
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: delete[] and NULL
Date: 1998/09/17
Message-ID: <35FDB14D.2781@wizard.net>#1/1
X-Deja-AN: 391890394
X-NNTP-Posting-Host: gscsgi02.gsfc.nasa.gov
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <m3pvcypuo9.fsf@skywalker.grs.de>
Content-Type: text/plain; charset=3Dus-ascii
Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
Mime-Version: 1.0
Newsgroups: comp.std.c++
Originator: clamage@taumet


Boris Schaefer wrote:

> Stroustrup 3rd ed says, that delete p has no effect, if p is 0.  It
> doesn't say anything about delete[]'ing 0, so my question is, what
> does the standard say on delete[] 0?

In section 5.3.5 it says, about both kinds of delete: "if the value of
the operand of delete is the null pointer the operation has no effect."



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




