From 8249723864534765955
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,176c9dc06a6729eb
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-03-26 07:51:03 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Pete Becker <petebecker@acm.org>
Newsgroups: comp.std.c++
Subject: Re: why doesn't delete NULL the pointer?
Date: Tue, 26 Mar 2002 15:50:18 GMT
Organization: Dinkumware, Ltd
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3C9FCF9D.D2E82F49@acm.org>
References: <a7j7vg$78s$1@watserv3.uwaterloo.ca> <3C9DD892.94860335@acm.org> <a7lhfq$co1$1@eeyore.INS.cwru.edu> <3C9E5A54.12B15FB3@acm.org> <a7lv1j$rp$1@watserv3.uwaterloo.ca>
X-Trace: mail2news.demon.co.uk 1017157831 mail2news:4754 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Date: 26 Mar 2002 01:32:13 GMT
X-Accept-Language:  en
Lines: 18
Xref: archiver1.google.com comp.std.c++:10195

Pedro Sam wrote:
> 
> I believe that by setting the pointer to NULL, further unintended access
> to that pointer will crash the program immediately (which is good). 

Believing it doesn't make it so. <g> Dereferencing a null pointer
produces undefined behavior. Nothing more.

-- 
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)

---
[ 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://www.research.att.com/~austern/csc/faq.html                ]



