From 6823278710729533199
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccfd547ab8587b55
X-Google-Attributes: gidf78e5,public
From: mborgerd@my-dejanews.com
Subject: Re: delete[] and NULL
Date: 1998/09/15
Message-ID: <6tmpg6$1e6$1@nnrp1.dejanews.com>#1/1
X-Deja-AN: 391510911
X-NNTP-Posting-Host: 209.95.225.195
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <m3pvcypuo9.fsf@skywalker.grs.de>
X-UID: 0000000002
X-Status: $$$T
X-Http-User-Agent: Mozilla/3.04 (WinNT; I)
X-Http-Proxy: 1.0 x5.dejanews.com:80 (Squid/1.1.22) for client 209.95.225.195
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Tue Sep 15 22:25:11 1998 GMT
Newsgroups: comp.std.c++
Originator: clamage@taumet


In article <m3pvcypuo9.fsf@skywalker.grs.de>,
  Boris Schaefer <sbo@psy.med.uni-muenchen.de> wrote:
>
> Hi,
> 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?
>
> Thanks for any info.
>
> --
> Boris Schaefer -- sbo@psy.med.uni-muenchen.de
According to draft standard:
18.4.1.2

  void operator delete[](void* ptr) throw();
  void  operator delete[](void* ptr, const std::nothrow_t&) throw();
[snip]
  Default behavior:

  --For a null value of ptr, does nothing.

  --Any  other  value of ptr shall be a value returned earlier by a call
    to  the  default operator new[](std::size_t).33) For such a non-null
    value of ptr, reclaims storage allocated by the earlier call to  the
    default operator new[].

Mark Borgerding
mborgerding@acm.NOSPAM.org
Sr. Software Developer
Sterling Commerce, Inc.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


[ 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              ]




