RetainPtr misuse, Web/WKAnimationController leaks: $ ack 'RetainPtr.*?alloc' | grep -v adopt WebKit/mac/WebView/WebImmediateActionController.mm:260: RetainPtr<WebAnimationController> dummyController = [[WebAnimationController alloc] init]; WebKit2/UIProcess/mac/WKImmediateActionController.mm:274: RetainPtr<WKAnimationController> dummyController = [[WKAnimationController alloc] init]; These should be adopted on allocation.
Created attachment 287824 [details] [PATCH] Proposed Fix
Comment on attachment 287824 [details] [PATCH] Proposed Fix Clearing flags on attachment: 287824 Committed r205378: <http://trac.webkit.org/changeset/205378>
All reviewed patches have been landed. Closing bug.
Comment on attachment 287824 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=287824&action=review > Source/WebKit/mac/WebView/WebImmediateActionController.mm:260 > - RetainPtr<WebAnimationController> dummyController = [[WebAnimationController alloc] init]; > - return dummyController.get(); > + RetainPtr<WebAnimationController> dummyController = adoptNS([[WebAnimationController alloc] init]); > + return dummyController.autorelease(); This should just be: return [[[WebAnimationController alloc] init] autorelease]; The RetainPtr does us no good at all. > Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:274 > - RetainPtr<WKAnimationController> dummyController = [[WKAnimationController alloc] init]; > - return dummyController.get(); > + RetainPtr<WKAnimationController> dummyController = adoptNS([[WKAnimationController alloc] init]); > + return dummyController.autorelease(); Ditto.
Yeah, that was dumb! Dropped RetainPtr with: https://trac.webkit.org/changeset/205427