Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: A proposal ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 12 Topic 9563 of 9831
Post > Topic >>

Re: A proposal to cancel overriding the DEFAULT operator new/delete

by xushiwei <xushiweizh@[EMAIL PROTECTED] > May 2, 2008 at 01:01 PM

{ clc++m uses English. It would be nicer for other English-only-speaking
  readers if the attribution line used English and the whole article used
  an encoding such as US-ASCII, ISO-8859 or UTF-8 that more English-based
  systems have sup****t for, though none of these is a rejection reason.
  -mod }

On 4月30日, 下午9时16分, Tony Delroy <tony_in_da...@[EMAIL PROTECTED]
> wrote:
> Why do you think existing code bothers to override the default
> operator new/delete?  It's typically not just for the sake of it.
> Clearly it achieves some purpose: particular performance
> characteristics, instrumentation, validations, sup****ts some
> functionality like persistence, who knows?  You don't.  I'm confident
> that the C++ standards committee wouldn't simply presume that it's not
> im****tant to the application - in the face of the fact that the
> programmer thought is was im****tant enough to code in the first place
> - and can be arbitrarily discarded, regardless of how you implore them.

Why overriding the DEFAULT operator new/delete is bad?

Allowing to override the DEFAULT operator new/delete means the DEFAULT
operator new/delete are special operators. When we have more than one
implementations of an operator, the compiler/linker will re****t a
redefining error. However, it allows there are two implementations of
the DEFAULT operator new/delete (one of them is implemented as
default). It sounds good. But, This gives a hint that there may have
many implementations of the DEFAULT operator new/delete. When this
happens, the compiler/linker doesn't know what should it do, and it
re****ts a defining error. The C++ programmers have to solve such
accidents, especially when they use 3rdparty codes —— You know, there
are many libraries overriding the DEFAULT operator new/delete. But
unfortunately, they take a risk of conflict with each other.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 12 Posts in Topic:
A proposal to cancel overriding the DEFAULT operator new/delete
xushiwei <xushiweizh@[  2008-04-30 04:13:22 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Tony Delroy <tony_in_d  2008-04-30 10:27:26 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Francis Glassborow <fr  2008-04-30 10:28:10 
Re: A proposal to cancel overriding the DEFAULT operator new/del
xushiwei <xushiweizh@[  2008-04-30 17:02:45 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Tony Delroy <tony_in_d  2008-04-30 22:16:45 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Francis Glassborow <fr  2008-04-30 22:16:29 
Re: A proposal to cancel overriding the DEFAULT operator new/del
xushiwei <xushiweizh@[  2008-05-02 13:02:22 
Re: A proposal to cancel overriding the DEFAULT operator new/del
xushiwei <xushiweizh@[  2008-05-02 13:01:37 
Re: A proposal to cancel overriding the DEFAULT operator new/del
"Stephen Howe"   2008-05-03 06:13:29 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Francis Glassborow <fr  2008-05-03 16:09:49 
Re: A proposal to cancel overriding the DEFAULT operator new/del
Alberto Ganesh Barbati &l  2008-05-04 17:17:09 
Re: A proposal to cancel overriding the DEFAULT operator new/del
dizzy <dizzy@[EMAIL PR  2008-05-05 07:13:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:02:06 CDT 2008.