[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory management

Pierre Phaneuf wrote:
> Keith Lucas wrote:
> > It's all quite long and involved (about 1/3 of the book is about not leaking
> > memory in one way or another), and does some FASCINATING stuff. {One idiom I
> > loved so much I just rushed out and used it is a way of changing the type of
> > an object at run-time... I used it to make arrays of things that actually
> > aren't all the same object, which is handy at times.}
> Changing the type of objects at runtime, as in dynamic_cast<> or
> something else? Arrays of different objects is basic OOP, isn't it?

Well, arrays of POINTERS to different objects derived from some
common base class.

You can't really have arrays of the actual objects because they
are all different lengths!

> When I say C++ is crap, I know what I'm talking about. It can be made to
> work, but it is creepy at best. Compared with the streamlined elegance
> of Smalltalk or Objective-C, C++ looks like a clunky elephant.

Oh - oh....another flame war brewing....I'm biting my tongue and
typing with one hand.


Steve Baker                (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-2466 (Fax)
Work: sjbaker@hti.com      http://www.hti.com
Home: sjbaker1@airmail.net http://web2.airmail.net/sjbaker1