Article View: comp.std.c++
Article #2085Re: Why not op delete(void* v&,size_t);?
From: Tim Hollebeek
Date: Sat, 30 Sep 1995 19:51
Date: Sat, 30 Sep 1995 19:51
33 lines
2071 bytes
2071 bytes
In article <44irni$10e@segfault.monkeys.com>, 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. My guess would be that in the event of multiple pointers to the same block, zeroing one pointer doesn't really solve anything. If the pointer were zeroed, people might get the impression that they don't have to keep track of what has been freed. >Heck! If you are going to ask about _that_ why not ask why member >functions get a `this' _pointer_ rather than a `this' reference? >The latter would clearly have been a far better choice. Agreed. I'm tired of returning *this. -- Tim Hollebeek | Everything above is a true statement, for sufficiently PChem Grad Student | false values of true. Princeton Univ. | C++ == OOP-- -------------------| tim@handel.princeton.edu http://wagner.princeton.edu/~tim [ 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:
<44k3iv$mok@cnn.Princeton.EDU>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageReferences:
<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!engnews2.Eng.Sun.COM!taumet!clamage From: tim@franck.Princeton.EDU (Tim Hollebeek) Newsgroups: comp.std.c++ Subject: Re: Why not op delete(void* v&,size_t);? Date: 30 Sep 1995 19:51:52 GMT Organization: Princeton University Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <44k3iv$mok@cnn.Princeton.EDU> References: <9509082051.AA01889@dawn.megaeng> <434me4$ov3@citadel.evolving.com> <44irni$10e@segfault.monkeys.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: franck.princeton.edu Content-Length: 1212 X-Lines: 29 Originator: clamage@taumet