[webkit-dev] Stop Using Raw Pointers & References in New Code

Michael Catanzaro mcatanzaro at redhat.com
Thu Jan 12 18:50:24 PST 2023


On Thu, Jan 12 2023 at 12:35:09 PM -0800, Ryosuke Niwa via webkit-dev 
<webkit-dev at lists.webkit.org> wrote:
> So… instead of:
> foo(bar());
> 
> do:
> foo(RefPtr { bar() }.get());

What's the value of creating a temporary RefPtr just to get at the 
underlying raw pointer? Isn't this overkill?




More information about the webkit-dev mailing list