Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2007-05-08 11:44:00


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Meryl Silverburgh
> Sent: Tuesday, May 08, 2007 11:32 AM
> To: boost-users_at_[hidden]
> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net