Web Extensions is using ARC for the WKWebExtension* classes and it turns out the APIObject wrapper object is causing a strong self reference and it never deallocates the objects. This was also masking a few other Web Extension leaks and issues.
Pull request: https://github.com/WebKit/WebKit/pull/6724
Committed 256954@main (bbb9a28e9547): <https://commits.webkit.org/256954@main> Reviewed commits have been landed. Closing PR #6724 and removing active labels.
<rdar://problem/102612963>