Article View: comp.std.c++
Article #1890Why not op delete(void* v&,size_t);?
From: Todd Blanchard
Date: Fri, 01 Sep 1995 18:04
Date: Fri, 01 Sep 1995 18:04
28 lines
1305 bytes
1305 bytes
This is common in C:
#define free(X) { free(X); X=0; }
You could do something similar in C++ as:
void operator delete (void*& p, size_t s)
{
::delete p;
p = 0;
}
but the standard definition is:
void operator delete(void* p, size_t);
Why is that?
--
-----------------------------------------------------------------------
Todd Blanchard tblancha@evolving.com
Evolving Systems Inc. VOX: (303) 689-1798
FAX: (303) 689-1399
"Never underestimate the power of stupid people in large groups."
-----------------------------------------------------------------------
---
[ 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:
<MATT.95Sep1110410@physics12.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!128.32.155.1!mattShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt From: tblancha@evolving.com (Todd Blanchard) Newsgroups: comp.std.c++ Subject: Why not op delete(void* v&,size_t);? Date: 01 Sep 1995 18:04:10 GMT Organization: Evolving Systems, Inc. Approved: matt@physics12.Berkeley.EDU (Matt Austern) Message-ID: <MATT.95Sep1110410@physics12.Berkeley.EDU> NNTP-Posting-Host: physics12.berkeley.edu