I had 2 questions regarding the std::shared_ptr
reference count block:
(1) Regarding size: How can I find the exact size occupied by the reference counter container in a std::shared_ptr?
(2) Regarding logic: Additionally, boost::shared_ptr
mentions that they are completely lock-free with respect to changes in the reference counter block.(Starting with Boost release 1.33.0, shared_ptr uses a lock-free implementation on most common platforms.) I don't think std::shared_ptr
follows the same - is this planned for any future C++ version? Doesn't this also mean that boost::shared_ptr
is a better idea for multithreaded cases?
Aucun commentaire:
Enregistrer un commentaire