Web Automation: -[_WKAutomationSession init] leaks: > - (instancetype)init > { > return [self initWithConfiguration:[_WKAutomationSessionConfiguration new]]; > } because we are not in ARC, the -new is a +1 but we should be passing an autoreleased object here. This was caught by the static analyzer. Test: > // shell> xcrun clang -framework Foundation -framework WebKit leak.m > > #import <WebKit/WebKit.h> > @interface _WKAutomationSession : NSObject > @end > > static void leak() { > [[[_WKAutomationSession alloc] init] release]; > } > > int main() { > @autoreleasepool { leak(); } > sleep(1000); > return 0; > } Leak: Process 68184: 1 leak for 16 total leaked bytes. Leak: 0x7fdd1b506ff0 size=16 zone: DefaultMallocZone_0x112fbd000 _WKAutomationSessionConfiguration ObjC WebKit 0x0eb156d9 0x001d8001 0x00000001 0x00000000 .V.............. Call stack: [thread 0x7fffa41cc340]: | 0x1 | start | main | leak | -[_WKAutomationSession init] _WKAutomationSession.mm:46 | +[NSObject new] | class_createInstance | calloc | malloc_zone_calloc
Created attachment 319689 [details] [PATCH] Proposed Fix
Comment on attachment 319689 [details] [PATCH] Proposed Fix Clearing flags on attachment: 319689 Committed r221538: <http://trac.webkit.org/changeset/221538>
All reviewed patches have been landed. Closing bug.
<rdar://problem/34693703>