Are smart pointers threadsafe?

uj
Total Points:
1,350
Status Points:
0
Brown Belt
May 6, 2008 10:53 PM PDT
Rate
 
#5 Reply to #4

Thank you both. I feel confident now that the Boost shared_ptr is as thread-safe as I need it to be.

With Boost shared_ptr as thread-safe as they are it shouldn't be necessary to have them in TBB too, unless there is some significant advantage like they could be made much more efficient or even safer or something.

Regarding the efficiency of reference counting per se. I'm aware that this kind of memory management comes at a price so I'm careful about not overusing it and I don't use it in "algorithm style" code.

 



Intel Software Network Forums Statistics

8292 users have contributed to 31239 threads and 99117 posts to date.
In the past 24 hours, we have 10 new thread(s) 11 new posts(s), and 19 new user(s).

In the past 3 days, the most popular thread for everyone has been huge pages on linux? The most posts were made to Pipeline buffer between stages? The post with the most views is Very amusing...  Escalated as

Please welcome our newest member amirsam7