AutoNull<T> sounds like a good idea, in addition to initializing to zero, I would like it handle operator-> to not crash ! Something like handling Java's NullPointerException
-- Chinmaya On Sat, Aug 7, 2010 at 9:59 PM, Eric Seidel <[email protected]> wrote: > I just spent a while debugging an error in code I wrote. > > I added a couple new Foo* members to a class. And forgot to 0 them in > one of the constructors. > > RefPtr<T>, OwnPtr<T> would have done this for me. But I wanted these > to be weak pointers. > > How about we add a Ptr<T> (or WeakPtr<T> or AutoNull<T> or whatever) > to wtf to stop this nonsense. > > -eric > _______________________________________________ > webkit-dev mailing list > [email protected] > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > -- -- chinmaya sn _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

