|
Boost Users : |
Subject: Re: [Boost-users] shared_ptr and global reset
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-02-26 10:12:51
>
> If you create shared_ptr with boost::make_shared, the counter and deleter
> would be allocated in the same block. Linked-list pointer has no
> significant advantages and for multi-threaded performance it is worse than
> shared_ptr.
>
True. If make_shared is used to create shared pointers, shared_ptr is better
than linked-list pointer for all usages.
> It has an adnvantage for this specific task: it is possible to access all
> the pointers that share the ownership and reset them all.
> Are there any other advantages of single-linked except space for a pointer
> ?
>
None that I know of.
Roman Perepelitsa.
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