Leak of three NSMutableDictionary objects each time rx::DisplayMtl::getMetalDeviceMatchingAttribute() is called. These three objects are created each time the method is called, but none of them are released before the method returns: NSMutableArray<id<MTLDevice>> *externalGPUs = [[NSMutableArray alloc] init]; NSMutableArray<id<MTLDevice>> *integratedGPUs = [[NSMutableArray alloc] init]; NSMutableArray<id<MTLDevice>> *discreteGPUs = [[NSMutableArray alloc] init]; Found by clang static analyzer. Regressed with this commit: Roll ANGLE to include upstreamed Metal backend <https://bugs.webkit.org/show_bug.cgi?id=220896> <rdar://problem/73539682> <https://commits.webkit.org/r286603>
<rdar://problem/87653812>
Created attachment 449282 [details] Patch v1
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Can ANGLE switch to ARC?
(In reply to Darin Adler from comment #4) > Can ANGLE switch to ARC? Yes. In fact, it would probably better align with upstream because I'm pretty sure Google builds ANGLE with ARC enabled today.
(In reply to David Kilzer (:ddkilzer) from comment #5) > (In reply to Darin Adler from comment #4) > > Can ANGLE switch to ARC? > > Yes. In fact, it would probably better align with upstream because I'm > pretty sure Google builds ANGLE with ARC enabled today. Let’s make that change, then, as soon as practical. I’d be happy to make the change and have you review, or you could make the change and I’d be happy to review.
Committed r288074 (246094@main): <https://commits.webkit.org/246094@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449282 [details].
(In reply to Darin Adler from comment #6) > (In reply to David Kilzer (:ddkilzer) from comment #5) > > (In reply to Darin Adler from comment #4) > > > Can ANGLE switch to ARC? > > > > Yes. In fact, it would probably better align with upstream because I'm > > pretty sure Google builds ANGLE with ARC enabled today. > > Let’s make that change, then, as soon as practical. I’d be happy to make the > change and have you review, or you could make the change and I’d be happy to > review. I'm not 100% sure about upstream building with ARC now. Filed this to track: Bug 235282: ANGLE should build with ARC enabled
(In reply to EWS from comment #7) > Committed r288074 (246094@main): <https://commits.webkit.org/246094@main> > > All reviewed patches have been landed. Closing bug and clearing flags on > attachment 449282 [details]. Follow-up fix based on Bug 235281, Comment #5: Committed r288097: <https://commits.webkit.org/r288097>
https://bugs.chromium.org/p/angleproject/issues/detail?id=6920