Repository navigation
Fix native connectors staying in memory after destroy - #506
Open
tvanlaerhoven wants to merge 2 commits into
Open
tvanlaerhoven wants to merge 2 commits into
tvanlaerhoven wants to merge 2 commits into
Conversation
The native modules kept destroyed connectors in their tag map, which kept the connector and its player in memory. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🦋 Changeset detectedLatest commit: a521fe9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔍 Required package checks skipped
The test plan skips the required package checks. All five affected packages define a typecheck, and Adobe Edge also defines a unit-test suite.
Was this helpful? React with 👍 or 👎 to provide feedback.
1 of 2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Android, a destroyed connector and the player it references stayed in memory for the lifetime of the app. Each native module keeps a map of connectors keyed by view tag, and
destroynever removed the entry. In an app that mounts and unmounts players, every unmounted player leaked.destroynow removes the map entry and destroys the connector on the UI queue thread, the same thread that adds entries.destroynow removes the map entry and disables the plugin on the UI queue thread.destroynow removes the map entry on the UI queue thread. The connector destroy call was already disabled and stays disabled.destroyalready ran on the UI queue thread; it now also removes the map entry.destroynow removes the dictionary entry. The other iOS modules already did this.Test plan
compileDebugKotlinfor the Adobe, Adobe Edge, Bitmovin and Nielsen modules fromapps/e2e/androidNo package-level
npm testornpm run typescriptwas run: the change is native-only.Generated with Devin