Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: WKWebView leak in the platform centered approach #1497

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

msmtamburro
Copy link
Contributor

Platforms affected

iOS

Motivation and Context

Addresses #1486

Description

Simply clears the _webViewEngine stored property in this class on ‘dispose’ so that it no longer retains a reference to the WKWebView after dispose.

Testing

In the platform centered approach (e.g, adding cordova-ios to an otherwise native app) via a swift package, we can subclass CDVViewController and dispose all plugins when our ViewController is no longer in the view hierarchy.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@dpogue dpogue added this to the 8.0.0 milestone Oct 14, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.86%. Comparing base (2f0e19e) to head (9ceadf4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1497   +/-   ##
=======================================
  Coverage   80.86%   80.86%           
=======================================
  Files          16       16           
  Lines        1840     1840           
=======================================
  Hits         1488     1488           
  Misses        352      352           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dpogue dpogue merged commit 8eacc92 into apache:master Oct 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Platform centered approach: let's add a way to destroy a WKWebView when done
3 participants