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

(android) Fix for webView window not being destroyed correctly causing memory leak (bug #290) #882

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PDLMobileApps
Copy link
Contributor

Platforms affected

android

Motivation and Context

This PR fixes #290

Description

A fix for the issue reported in #290 is suggested in the same. I created this pull request after implementing the fix in my own forked repo and verifying it works as intended in Android.

Testing

  • Launched the app compiled without the fix on Android and verified the issue is present using the Chrome Inspector (window with about:blank is present after IAB window is closed)
  • Compiled the app with the fix and launched it
  • Opened an IAB window
  • Closed the IAB window and verified the issue is no longer present using the Chrome Inspector (window with about:blank is no longer present after IAB window is closed)
  • Repeated the test a few time

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

@PDLMobileApps PDLMobileApps changed the title (android) Fix for webView window not being destroyed correctly causing memory leak (#290) (android) Fix for webView window not being destroyed correctly causing memory leak (bug #290) Jun 16, 2021
Copy link
Contributor

@mosabab mosabab left a comment

Choose a reason for hiding this comment

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

The code LGT
Thanks for contributing

@dudtlr072
Copy link

When will the full version with these fixes be released?


// Fix for webView window not being destroyed correctly causing memory leak
// (https://github.com/apache/cordova-plugin-inappbrowser/issues/290)
if (url.equals(new String("about:blank"))) {
Copy link

Choose a reason for hiding this comment

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

The call to new String() is unnecessary, consider doing: if (url.equals("about:blank")) {

@marc7000
Copy link

When will the next version with these fixes be released?

@NiklasMerz NiklasMerz added this to the 5.next milestone Nov 4, 2023
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.

InAppBrowser will not destroy WebView after being closed (by invoking ref.close()) causing memory leaks
6 participants