On Fri, Aug 01, 2014 at 11:52:03AM +1200, Robert O'Callahan wrote:
> On Fri, Aug 1, 2014 at 11:24 AM, Jeff Walden <jwalden+...@mit.edu> wrote:
> 
> > One last note.  UniquePtr is patterned on std::unique_ptr, the C++11
> > standard version of this idiom.  The current mozilla::Scoped class is
> > another recent attempt to address largely the same needs.  The older
> > nsAutoPtr and nsAutoArrayPtr classes are even older attempts at a solution,
> > that suffer from the (T&) non-copy-constructor problem mentioned before.

nsAutoPtr is kind of half fixed at this point fwiw.

> >  Scoped, nsAutoPtr, and nsAutoArrayPtr shouldn't be used now that UniquePtr
> > is available, and the former class is now deprecated (and is slowly being
> > removed).  (I consider nsAutoPtr and nsAutoArrayPtr deprecated as well, but
> > it's not within my power to authoritatively declare it so.  Nonetheless,
> > you should treat them as such.)
> >
> 
> Is there anything blocking us from mass-removing nsAutoPtr/nsAutoArrayPtr
> in favour of UniquePtr?

Well, there's at least one place in the tree that uses nsAutoPtr in a
broken way (ExplicitChildIterator which I have a patch for)  but the
posibility of that kind of issue makes it not totally trivial.

> I think it's more important to remove old stuff than add new stuff, so the
> sooner we can mass-remove nsAutoPtr/nsAutoArrayPtr the better.

For nsAutoPtr I suspect the easiest thing to do is first finish fixing
usage of its weird copy ctor, at which point it should be trivial to
remove it.

Trev

> 
> Rob
> -- 
> oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
> owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
> osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
> owohooo
> osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
> oioso
> oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
> owohooo
> osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
> ooofo
> otohoeo ofoioroeo ooofo ohoeololo.
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to