[Webkit-unassigned] [Bug 89186] [EFL][WK2] Add APIs to create, delete and get ewk_context.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 12 23:03:44 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89186





--- Comment #14 from Christophe Dumez <christophe.dumez at intel.com>  2012-07-12 23:03:43 PST ---
(From update of attachment 149910)
View in context: https://bugs.webkit.org/attachment.cgi?id=149910&action=review

>>>>> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:35
>>>>> +    _Ewk_Context(WKRetainPtr<WKContextRef> contextRef)
>>>> 
>>>> Why this change?
>>> 
>>> We have to use adoptWK() here because WKContextCreate() returns leakPtr(),
>>> and we have to get that using WKRetainPtr in the line 35 to prevent memory leak.
>> 
>> It is already assigned to context which is a WKRetainPtr<WKContextRef>, so I did not think there was a leak here. Are you sure?
> 
> I think my sentence caused the confusion. I can explain again.
> I use the adoptWK() to prevent leak because WKContextCreate() returns leakPtr(),  so the leak problem is fixed here.
> and, I change the _Ewk_Context()'s parameter to WKRetainPtr because adoptWK() returns WKRetainPtr type. but I can use WKContextRef if I return the adoptWK(...).get() istead of adoptWK(...).
> So, do you want that?

No, it is fine as it is. I understand now. Thanks for the explanation. the adoptWK() is indeed needed when you call a *Create() function.

-- 
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