
30 Jan
2006
30 Jan
'06
9:36 a.m.
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