Topic: Useless follow-ups (was: [Q] mixing realloc and new)


Author: "Ronald F. Guilmette" <rfg@rahul.net>
Date: 1995/06/27
Raw View
In article <1995Jun24.193118@opal.tufts.edu>,
Jonathan Borden <jkauer@opal.tufts.edu> wrote:
>> Is this cool?  I.e., if I create an instance using new & then need to
>> make it bigger, can I realloc() it and then safely delete it using
>> delete (or must I use free())?  As always, TIA.
>>
> no, not cool. this is an uuugly hack that might work but never
>absolutely needs to be done. read Coplien's "Advanced C++" (readily available
>in bookstores) for ways to use placement new etc...

I am somewhat dismayed by the poor quality of many of the follow-ups that
I see posted here, especially when I view them relative to the many high-
quality follow-ups (and answers to questions) that I see on a regular basis
over in the comp.std.c newsgroup.

A polite request:  Folks, if someone asks a question like ``Can I do this
in standard C++?'' and if you think you know the answer, that's all well
and good, but if you are going to _post_ an answer, please make it an
authoritative and enlightening one by quoting chapter and verse from the
publically available draft C++ standard to support your conclusions.  Doing
so provides all of us with more and better information about the actual
draft standard, and may actually give rise to yet more interesting discussions
regarding possible alternative interpretations of the draft wording.

(Thankfully, we _do_ have several regular contributors here who _do_ make
it a point to support their responses to questions with direct quotes from
the latest draft on many/most occasions... e.g. Steve Clamage, Jason Merrill,
and many others.  Aw heck.  You know who you all are.)
--

-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- E-mail: rfg@segfault.us.com ----------- Purveyors of Compiler Test ----
---- finger: rfg@rahul.net ----------------- Suites and Bullet-Proof Shoes -