[webkit-dev] JSRetainPtr and JSStringRef
aroben at apple.com
Wed Dec 15 08:42:19 PST 2010
On Dec 15, 2010, at 9:13 AM, John Knottenbelt wrote:
> I'm looking at adding a method on the LayoutTestController in DumpRenderTree that will return a string. I see that some methods there return JSRetainPtr<JSStringRef> and some just return JSStringRef.
> Can anybody comment on when it is appropriate to return JSRetainPtr vs plain JSStringRef?
JSRetainPtr<JSStringRef> should be used any time it is the responsibility of the caller to release the JSStringRef. Otherwise it is fine to use a plain JSStringRef.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev