Re: Always avoid "new"

From: Andrew Koenig (ark_at_acm.org)
Date: 05/02/04


Date: Sun, 02 May 2004 14:38:57 GMT


"jeffc" <nobody@nowhere.com> wrote in message
news:4092c3b0_1@news1.prserv.net...

> > Use a vector.

> But of course, if *you* were the one having to implement the vector, you'd
> have to use new.

Not really; I'd use std::allocator instead, because it gives me
finer-grained control over construction and destruction than new does.



Relevant Pages

  • Nature of Islam
    ... because each cause can have several effects depending on the environment in ... The destruction releases materials for new ... the construction and destruction are both good. ... Pleasure derives from actions that benefit. ...
    (soc.religion.islam)
  • Re: DllMain is called when....
    ... I did not have time to go over the detils of the destruction order ... (I gave that for granted that is was the reverse construction order) ... and the relationship between ctros of globals, local statics, and atexit. ...
    (microsoft.public.vc.language)
  • Re: OOP and memory management
    ... complicated data structure, construction and destruction are not ... I am afraid I do not understand how the quantity of garbage influences ...
    (comp.programming)
  • Re: Larkin, Power BASIC cannot be THAT good:
    ... In my view you must be complete idiot if you invent 'operator overloading', ... At some point object oriented programming turns out to be very ... kicker is construction and destruction. ...
    (sci.electronics.design)
  • Re: OOP and memory management
    ... construction and destruction are not ... > I am afraid I do not understand how the quantity of garbage influences ... Manipulating a graph in general presents no problems - your ...
    (comp.programming)