From -674687139099317763
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,176c9dc06a6729eb
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-03-24 20:55:01 PST
Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: Francis Glassborow <francis.glassborow@ntlworld.com>
Newsgroups: comp.std.c++
Subject: Re: why doesn't delete NULL the pointer?
Date: Sun, 24 Mar 2002 22:52:47 CST
Organization: Southfield Microcomputer SS
Lines: 32
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <lwwsrIEQ1in8Ew21@robinton.ntlworld.com>
References: <a7j7vg$78s$1@watserv3.uwaterloo.ca>
 <KYBnxQAVcbn8EwAC@robinton.ntlworld.com> <3C9DF1AC.D46ECA4B@wizard.net>
Reply-To: Francis Glassborow <francisG@robinton.demon.co.uk>
Mime-Version: 1.0
Content-Type: text/plain;charset=us-ascii;format=flowed
Return-Path: <devnull@stump.algebra.com>
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)
User-Agent: Turnpike/6.01-U (<TilyaeicE$WmMOP9F8P4$y3lmP>)
Xref: archiver1.google.com comp.std.c++:10162

In article <3C9DF1AC.D46ECA4B@wizard.net>, James Kuyper Jr. 
<kuyper@wizard.net> writes
>Francis Glassborow wrote:
>....
>> We could do with an FAQ round here. delete gets a pointer value, (and
>> essentially that is what it must get) aka an address of the object to be
>> destroyed and have its memory released. It knows nothing of the
>> location, if any, where that address is stored.
>
>The point is, that delete could have been given a different interface
>that took a pointer to a pointer, or a reference to a pointer, which
>would have allowed such semantics. So the question of why that wasn't
>done is legitimate.

But to justify that it would be necessary to demonstrate that the result 
was more useful. Everything I have ever seen shows that the contrary 
would be the case. In fact since people have come to recognise the 
desirability of using smart pointers, handles etc. the case is almost 
entirely moot.

-- 
Francis Glassborow
Check out the ACCU Spring Conference 2002
4 Days, 4 tracks, 4+ languages, World class speakers
For details see: http://www.accu.org/events/public/accu0204.htm

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



