🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by akv Mon, 02 Oct 1995 15:13
Re: Why not op delete(void* v&,size_t);?
#2096
Author: 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. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads