On Thursday, August 17, 2017 at 1:02:56 PM UTC+2, Aryeh Gregor wrote: > Note that in this case you cannot ignore the return value -- it must > be assigned to an nsCOMPtr or a RefPtr, or else it will leak. Ideally > we would allow a return type of nsCOMPtr<nsIMutableArray>&&, but > currently I think we don't.
This is not entirely correct. alreadyAddRefed<T> is marked MOZ_MUST_USE_TYPE. If you do not use the return value, it will not compile. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform