On Sun, Mar 26, 2017 at 12:28 PM, Konstantin Tokarev <annu...@yandex.ru> wrote:
> Hello,
>
> What is the most appropriate way to do subject, given that ptr is RefPtr<T>?
>
> 1. f(*ptr)
> 2. f(ptr.releaseNonNull())

Both forms are depending on what you're trying to do. 1 is appropriate
and necessary if ptr is used after the call to f but it results in an
unnecessary ref-churn if ptr is never used after the call. 2 is
appropriate if ptr is never after the call, and would avoid a
ref-churn.

- R. Niwa
_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help

Reply via email to