WebProcessProxy::sendAudioComponentRegistrations leaks CFDataRef
<rdar://problem/76176827>
Created attachment 425561 [details] Patch
Committed r275735 (236322@main): <https://commits.webkit.org/236322@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425561 [details].
Comment on attachment 425561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425561&action=review > Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:299 > + RunLoop::main().dispatch([protectedThis = WTFMove(protectedThis), registrations = adoptCF(registrations)] () mutable { We always try to keep the adoptCF as close as possible to the call that returns the retained object. Here itβs pretty close, but so easy to miss! I kind of wish there was a more straightforward way to write this. On the other hand this is clearly correct code that does the right thing now.