Boost logo

Boost Users :

Subject: [Boost-users] intrusive_ptr vs shared-ptr
From: ilya shlyakhter (ilyawebmail_at_[hidden])
Date: 2013-01-18 18:38:09


Dear Boosters,

The documentation of intrusive_ptr says

"As a general rule, if it isn't obvious whether intrusive_ptr better
fits your needs than shared_ptr, try a shared_ptr-based design first."

but does not explain why.

If the classes involved are all my own and deriving them all from a base class
that implements reference-counting is not a problem, what are some reasons
to prefer shared_ptr to intrusive_ptr?

Thanks,

Ilya


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