This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Ensure that unregisterTexture is called when forget to call SurfaceTextureEntry.release#28304
Merged
fluttergithubbot merged 2 commits intoflutter:masterfrom Aug 31, 2021
Merged
Conversation
…xtureEntry.release
Member
Author
|
/cc @jason-simmons |
|
|
||
| handler.post( | ||
| new Runnable() { | ||
| public void run() { |
Member
There was a problem hiding this comment.
Convert this Runnable into a static class that does not hold an implicit reference to the SurfaceTextureRegistryEntry.
This will avoid the complexity of resurrecting an object that has already been finalized.
The Runnable will need to hold a reference to the FlutterJNI and the texture ID. If the FlutterJNI is still attached when the Runnable runs on the main thread, then it can call FlutterJNI.unregisterTexture
jason-simmons
approved these changes
Aug 30, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 31, 2021
…urfaceTextureEntry.release (flutter/engine#28304)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 31, 2021
…urfaceTextureEntry.release (flutter/engine#28304)
blasten
reviewed
Jun 3, 2022
|
|
||
| @Override | ||
| public void run() { | ||
| if (!flutterJNI.isAttached()) { |
There was a problem hiding this comment.
shouldn't this also check if release changed when this code runs?
Member
Author
There was a problem hiding this comment.
We checked it in the 'finalize' method, and I think the flag cannot be changed when the code runs here.
8 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix the issue : flutter/flutter#88571
Pre-launch Checklist
writing and running engine tests.
///).