JavaScriptCore/API/JSContext.mm:200:73: warning: Potential leak of an object JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[name copy]) : nullptr; ^
Created attachment 233325 [details] Patch v1
Comment on attachment 233325 [details] Patch v1 r=me! Thanks
Comment on attachment 233325 [details] Patch v1 Clearing flags on attachment: 233325 Committed r170117: <http://trac.webkit.org/changeset/170117>
All reviewed patches have been landed. Closing bug.
Comment on attachment 233325 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=233325&action=review > Source/JavaScriptCore/API/JSContext.mm:200 > - JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[name copy]) : nullptr; > + JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[[name copy] autorelease]) : nullptr; Why not just remove the call to copy? There’s no need for a copy here.