[Webkit-unassigned] [Bug 205617] Add makeRefCounted<>
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 10 07:15:36 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=205617
youenn fablet <youennf at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |youennf at gmail.com
--- Comment #15 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 386469
--> https://bugs.webkit.org/attachment.cgi?id=386469
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=386469&action=review
> Source/WTF/ChangeLog:13
> + (WTF::makeRefCounted):
Usually we have the create method that is public and the constructor which is private.
This seems like a good patern for RefCounted object as such object should never be created on the stack or we should never forget the adoptRef call.
That would basically means switching from a create method to making makeRefCounted friend.
The alternative would be to have a templated create(Args&&... args) method, which would be a one liner as well.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200110/992e1e31/attachment.htm>
More information about the webkit-unassigned
mailing list