On Mon, Jul 22, 2013 at 5:39 PM, Justin Lebar <justin.le...@gmail.com>wrote:

> But if we return nsRefPtr, then if I have
>
>   nsRefPtr<Foo> GetFoo();
>   Foo* = GetFoo();
>
> that compiles fine (I think?) because nsRefPtr<T> has an implicit
> conversion to T*.
>

It doesn't leak, though. OTOH you probably get a use-after-free, which is
worse. So I dunno, maybe this is a bad idea.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to