On 8/2/2015 10:21 AM, Boris Zbarsky wrote:
On 8/2/15 7:34 AM, Hubert Figuière wrote:
This is also part of why I'd suggest having an construction method that
will return a smart pointer - preventing the use of raw pointers.
Returning an already_AddRefed would prevent the use of raw pointers,
but would leak if the caller used "auto", right?
Returning an nsRefPtr would not prevent the use of raw pointers,
allowing a caller to write:
I've discussed this several times, but with we added operator T*() && =
delete;, that would prevent the scenario you're talking about here.
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform