Apache Qpid : SharedPtr
This page last changed on Oct 19, 2006 by mmccorma.
std::tr1::shared_ptr is an almost-standard smart pointer template that It's available in g++ and some other compilers by default. There are The golde rule: if class Foo has shared ownership then never ever Qpid will use it for all classes with shared ownership semantics, class Foo { Foo() { ... } public: typedef std::tr1::shared_ptr<Foo> shared_ptr; static shared_ptr create() { return new Foo() } // .. a create for each constructor. } Foo::shared_ptr p = Foo::create(); // etc... There's a good article at http://www.boost.org/libs/smart_ptr/sp_techniques.html. |
Document generated by Confluence on Apr 22, 2008 02:47 |