From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: mrs@wrs.com (Mike Stump) Cc: carlo@runaway.xs4all.nl, egcs@cygnus.com Subject: Re: malloc/free & new/delete balance Date: Thu, 02 Jul 1998 01:39:00 -0000 Message-id: References: <199807020117.SAA25899@kankakee.wrs.com> X-SW-Source: 1998-07/msg00075.html Mike Stump writes: >> Agreed, but, for some reason, the FDIS [lib.new.delete.array] >> defines operator new[](size_t) as returning operator new(size_t) by >> default, while it states that operator delete[](void*) frees > Can you provide an exact quote of this? I can't find it. I'll quote > from the FDIS below. I didn't write delete[] calls free(), I just said it frees (deallocates) the memory. No where it says delete[] calls delete by default, and, since it does for new[] and new, I took it as a difference, rather than as an omission. > The next stage of your learning is to be able to say when the standard > is wrong. :-) :-) > Also, I think we are staring at different papers. Does yours have the > number 14882 or X3J16/97-0079 on it? If not, that isn't the FDIS, and > you should not call it that. Actually, mine is an html-ized version that has no such numbers, it just says `November 1997 Draft Standard'. AFAIK, it contains all the text from the FDIS. >> From the real FDIS: > -12- Default behavior: [snip] > For such a non-null value of ptr , reclaims storage allocated > by the earlier call to the default operator new[]. -- Alexandre Oliva mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva Universidade Estadual de Campinas, SP, Brasil