Re: Why does the [] operator in vector behave as it does?

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

 



Hi All,

An option Eljay didn't mention, which I use almost all
the time (certainly every time I may have a large
number of objects of a given UDT, as I always manage
such collections with one of the STL containers), is
to store your objects on the heap and manage them
through smart pointers (I prefer those in boost - but
any that have the right semantics for STL containers
will do).  They are assignable, and will take care of
deleting your objects at the right time.

HTH

Ted

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux