-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Meryl Silverburgh Sent: Tuesday, May 08, 2007 11:32 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Pointer in function parameter?
So is it safe to say I can replace all 'A*' in my program to shared_ptr<A>?
[Nat] As long as all your A objects are allocated on the heap, yes.
I don't need to worry about scoped_ptr or other smart pointers in boost?
[Nat] We don't. The only other Boost smart pointer we've used is intrusive_ptr, and that only because we learned a bit late about the shared_ptr mechanism for returning a new shared_ptr to 'this'. Also, with respect to some of the other Boost libraries (notably Boost.Python), shared_ptr is "smarter" than the other Boost smart pointers.