[Webkit-unassigned] [Bug 127554] [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 27 08:53:35 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=127554
--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> 2014-01-27 08:51:00 PST ---
(From update of attachment 222093)
View in context: https://bugs.webkit.org/attachment.cgi?id=222093&action=review
Thanks for the review.
>> Tools/TestWebKitAPI/Tests/WTF/gobject/GUniquePtr.cpp:188
>> + a.reset();
>
> No need for calling reset() here -- the GUniqueOutPtr will handle freeing the memory when it goes out of scope and is destroyed.
Well, this is actually a test to check that reset works, if we make it private we don't need this test.
>> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:146
>> + result.reset();
>
> No need for calling reset() here (since the unique pointer will be reset when outPtr() is called the next time) ...
You are right.
>> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:168
>> + result.reset();
>
> ... or here (since the pointer will be deleted when GUniqueOutPtr goes out of scope).
>
> I guess GUniqueOutPtr is now smart enough that the user doesn't really have to know about the reset() method, so it can be made private.
Yes, I agree, and the proof is that it's only used in this test and it's not actually needed
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list