On Aug 23, 2010, at 10:17 AM, Martin Robinson wrote:

> On Mon, Aug 23, 2010 at 10:06 AM, Eric Seidel <e...@webkit.org> wrote:
>> Would this then combine with the Mac/Win port's RetainPtr in some way?
> 
> I think it makes a lot of sense to gradually combine our duplicate smart 
> pointer logic into one base or templated class. They all seem to be in WTF, 
> so even more so.

One reason I have not pursued this up until this point is that template classes 
with multiple arguments result in very unpleasant function names in crash 
traces and the debugger. See HashMap.

At one point I wanted to teach OwnPtr about all the appropriate ways to delete 
different objects on Windows, but I abandoned that. Enough of it was left 
behind that the OwnPtr class can be used that way now.

If overloading can be used to determine how to do the "take a ref" and "release 
a ref" functions, then many different subsystems can share a single 
PassRefPtr/RefPtr class.

    -- Darin

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to