benjamin at webkit.org
Sat Oct 26 20:11:50 PDT 2013
On 10/26/13, 8:51 PM, Brendan Long wrote:
> One of the answers on this Stack Overflow question
> 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
> Unfortunately, it looks like
> they're really slow because they're thread-safe, but that may also apply
> to RefPtr.
RefPtr is not thread-safe.
The count itself is maintained by the objects, not the smart pointer.
The vast majority of objects are not thread-safe either due to obvious
More information about the webkit-dev