🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Why not op delete(void* v&,size_t);?

#2096
From: akv
Date: Mon, 02 Oct 1995 15:13
32 lines
1820 bytes
>>>>> On 01 Oct 1995 05:39:01 GMT, vandevod@cs.rpi.edu (David
Vandevoorde) said:

>>>>> "RG" == Ronald F Guilmette <rfg@monkeys.com> writes:
    RG> In article <434me4$ov3@citadel.evolving.com>, Todd Blanchard
    RG> <tblancha@evolving.com> wrote:
    >>> void operator delete(void*,size_t); ...  Nowhere can I find a
    >>> rational explanation for why the pointer is not passed as a
    >>> void*& (to allow zeroing).  It would provide more flexibility
    >>> in memory management schemes.

    RG> Maybe the answer is that delete came before references... then
    RG> again, maybe not.

    David> Wouldn't this cause problems when attempting to delete
    David> const pointers?

    David> 	X* const xp = new X; // ...  delete xp; // Or is this
    David> illegal anyway? I suspect not.

I don't understand how "delete xp" would be true. Because delete takes
a void * and how can a X* const be converted to void* const? Is that a
standard conversion by any chance? I'd be surprised if it is. 

In any case, none of the compilers that I use now complain. 

Cheers,
Anil

[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <44ovi7$pnb@engnews2.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: akv@cacs.usl.edu
Newsgroups: comp.std.c++
Subject: Re: Why not op delete(void* v&,size_t);?
Date: 2 Oct 1995 15:13:11 GMT
Organization: ?
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <44ovi7$pnb@engnews2.Eng.Sun.COM>
Reply-To: akv@cacs.usl.edu
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Attribution: Anil
X-Sender: akv@srl06.cacs.usl.edu
Content-Length: 1078
X-Lines: 28
Originator: clamage@taumet