Article View: comp.std.c++
Article #2086Re: Why not op delete(void* v&,size_t);?
From: Anil Kumar Vijendran
Date: Mon, 02 Oct 1995 08:24
Date: Mon, 02 Oct 1995 08:24
33 lines
1718 bytes
1718 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:
<9510020800.AA06591@marsh.cacs.usl.edu>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back Date: 02 Oct 95 08:24:13 GMT Approved: fjh@cs.mu.oz.au Organization: - Newsgroups: comp.std.c++ X-Original-Date: Mon, 2 Oct 95 03:00:49 CDT From: akv@marsh.cacs.usl.edu (Anil Kumar Vijendran) Message-ID: <9510020800.AA06591@marsh.cacs.usl.edu> Subject: Re: Why not op delete(void* v&,size_t);? Reply-To: akv@cacs.usl.edu X-Attribution: Anil