apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 986 forks source link

fix: Fix memory leak from user script handler #1456

Closed dpogue closed 3 months ago

dpogue commented 3 months ago

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

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.