* Florian Weimer <fw@xxxxxxxxxxxxx> wrote: > * Enrico Weigelt: > > >> GCC includes a tr1::shared_ptr so there's no extra dependency if you > >> are only planning to use g++, and std::shared_ptr is part of C++0x. > > > > How does that one actually work and what do I have to do to use it ? > > What's the oldest GCC version you're targeting? Quite old, still some 3.x (can have a look when I'm back in office tomorrow ...) > Modern GCC has std::unique_ptr (zero-overhead pointer wrapper with > RAII semantics), std::shared_ptr and std::make_shared (avoiding a > separate allocation using operator new). This should work after some > adjustments, as long as your data structures are acyclic. You just > have to avoid taking short-cuts to optimize things, using references > and plain pointers instead of the std:: wrappers. We make quite heavy use of references. cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weigelt@xxxxxxxx mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------