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: Fix memory leak from user script handler #1456

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Aug 14, 2024

Platforms affected

iOS

Motivation and Context

Closes #920.

Description

Ensure that we remove the WKWebView script message handler when the web view plugin is disposed. Otherwise it stays in memory holding references to stuff.

Testing

Tests pass

Checklist

  • I've run the tests to see all new and existing tests pass
  • 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)

@dpogue dpogue added this to the 8.0.0 milestone Aug 14, 2024
@dpogue dpogue requested a review from erisu August 14, 2024 08:24
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.35%. Comparing base (c6fd16f) to head (d1b66ee).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1456   +/-   ##
=======================================
  Coverage   78.35%   78.35%           
=======================================
  Files          16       16           
  Lines        1825     1825           
=======================================
  Hits         1430     1430           
  Misses        395      395           

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

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dpogue dpogue merged commit 5089892 into apache:master Aug 15, 2024
10 checks passed
@dpogue dpogue deleted the memleak-fix branch August 15, 2024 07:52
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.

CDVViewController leaks CDVWebViewWeakScriptMessageHandler when destroyed
3 participants