[webkit-dev] std::shared_ptr?

Brendan Long self at brendanlong.com
Sat Oct 26 20:51:51 PDT 2013


One of the answers on this Stack Overflow question
<http://stackoverflow.com/questions/3628081/shared-ptr-horrible-speed>
suggests that we can fix the memory issue by using `making_shared`:

> *use* |make_shared|
<http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared> *to
allocate them*, because (unfortunately) the normal constructor allocates
two different blocks: one for the object and one for the counter and
deleter.

Unfortunately, it looks like
<http://nerds-central.blogspot.com/2012/03/sharedptr-performance-issues-and.html>
they're really slow because they're thread-safe, but that may also apply
to RefPtr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20131026/32480981/attachment.html>


More information about the webkit-dev mailing list