Article View: comp.std.c++
Article #2094Re: Why not op delete(void* v&,size_t);?
From: J. Kanze
Date: Tue, 03 Oct 1995 10:16
Date: Tue, 03 Oct 1995 10:16
31 lines
1803 bytes
1803 bytes
Ronald F. Guilmette (rfg@monkeys.com) wrote:
|> In article <434me4$ov3@citadel.evolving.com>,
|> Todd Blanchard <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.
|> Maybe the answer is that delete came before references... then again,
|> maybe not.
I imagine that the real reason is that this would require an lvalue as
parameter for delete, and in general, this is *not* the case. (Note
that the result of casting T* to a void* is *not* an lvalue.)
I'd be curious in hearing how to implement this proposal on machines
where void* does not have the same representation as T* (where T is a
class).
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils en informatique industrielle--
--Beratung in industrieller Datenverarbeitung
---
[ 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:
<44qs68$f6t@gabi.gabi-soft.fr>Path:
arc1-ca.pugleaf.net!128.32.155.1!mattReferences:
<9509082051.AA01889@dawn.megaeng> <434me4$ov3@citadel.evolving.com> <44irni$10e@segfault.monkeys.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt From: kanze@gabi-soft.fr (J. Kanze) Newsgroups: comp.std.c++ Subject: Re: Why not op delete(void* v&,size_t);? Date: 03 Oct 1995 10:16:24 GMT Organization: GABI Software, Sarl. Approved: matt@physics2.Berkeley.EDU (Matt Austern) Message-ID: <44qs68$f6t@gabi.gabi-soft.fr> References: <9509082051.AA01889@dawn.megaeng> <434me4$ov3@citadel.evolving.com> <44irni$10e@segfault.monkeys.com> NNTP-Posting-Host: physics2.berkeley.edu