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

Javascript object added but never removed #184

Closed
ErikHellman opened this issue Dec 7, 2018 · 1 comment · Fixed by readium/r2-navigator-kotlin#191
Closed

Javascript object added but never removed #184

ErikHellman opened this issue Dec 7, 2018 · 1 comment · Fixed by readium/r2-navigator-kotlin#191
Labels
bug Something isn't working

Comments

@ErikHellman
Copy link
Contributor

Currently, the "Android" object is added to the JavaScript context in the fragments (https://github.com/readium/r2-navigator-kotlin/blob/develop/r2-navigator/src/main/java/org/readium/r2/navigator/pager/R2EpubPageFragment.kt#L84), but they are never removed when the fragment goes away. This means that we're effectively leaking a reference.

Since the WebView class is extended, a better solution would be to let this view handle the adding and removing of this JavaScript object itself inside its own lifecycle (onAttached/onDetached).

@mickael-menu
Copy link
Member

@mickael-menu mickael-menu transferred this issue from readium/r2-navigator-kotlin Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants