Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2006-01-30 04:36:06


David Maisonave wrote:
> The only advantage I found with reference-count is that it requires less
> memory.
> Other than that, in my test it performs the worse when compared to
> reference-link and reference-intrusive.
> I don't understand why reference-count was picked instead of reference-link
> for the boost::shared_ptr

It's in the FAQ:

http://www.boost.org/libs/smart_ptr/shared_ptr.htm#FAQ

  Q. Why doesn't shared_ptr use a linked list implementation?

  A. A linked list implementation does not offer enough advantages to
     offset the added cost of an extra pointer. See timings page. In
     addition, it is expensive to make a linked list implementation
     thread safe.

-- 
Daniel Wallin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk