зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1856746: Extend already_AddRefed documentation to mention a case where it makes sense as a function parameter. r=nika
DONTBUILD because comment-only Differential Revision: https://phabricator.services.mozilla.com/D189987
This commit is contained in:
Родитель
f2b4db401c
Коммит
aab09ae7db
|
@ -24,7 +24,10 @@ struct unused_t;
|
|||
* already_AddRefed cooperates with reference counting smart pointers to enable
|
||||
* you to assign in a pointer _without_ |AddRef|ing it. You might want to use
|
||||
* this as a return type from a function that returns an already |AddRef|ed
|
||||
* pointer.
|
||||
* pointer. Or, you might want to use this as a parameter type in a function
|
||||
* that wants to force a transfer-of-ownership from a RefPtr in the caller (for
|
||||
* example, if the function expects callers to pass in a newly-created object,
|
||||
* which the function then takes ownership of).
|
||||
*
|
||||
* TODO Move already_AddRefed to namespace mozilla. This has not yet been done
|
||||
* because of the sheer number of usages of already_AddRefed.
|
||||
|
|
Загрузка…
Ссылка в новой задаче