C
ctick
Are there any advantages of using boost::shared_ptr other than auto_ptr from
standard library?
standard library?
Are there any advantages of using boost::shared_ptr other than auto_ptr from
standard library?
I could list up a fourth and fifth advantage, and perhaps more, but I
think that's enough. The main advantage of std::auto_ptr is that it's
always there and that it's standard. It should therefore be used when
the generality of e.g. boost::shared_ptr is not required.
Are there any advantages of using boost::shared_ptr other than auto_ptr from
standard library?
For the _really_ simple things, consider boost::scoped_ptr. NoDavid Harmon said:On Sat, 19 Jun 2004 20:23:26 GMT in comp.lang.c++, (e-mail address removed) (Alf
P. Steinbach) wrote,
I think that auto_ptr also has less overhead cost than shared_ptr's
ownership tracking mechanism when you are doing the simple things it is
capable of and have no need for shared ownership.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.