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

8492 users have contributed to 31630 threads and 100774 posts to date.
In the past 24 hours, we have 27 new thread(s) 122 new posts(s), and 166 new user(s).

In the past 3 days, the most popular thread for everyone has been Implicite multithreading ??? The most posts were made to Crash when loading skeleton The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member mdward