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
Add clear method in FlutterEngineCache to clear all cached Flutter engines #78420 #25280
Conversation
// --- Execute Test --- | ||
cache.put("my_flutter_engine", flutterEngine); | ||
cache.put("my_flutter_engine_2", flutterEngine2); | ||
cache.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert here that those engines are indeed there and equal to flutterEngine
and flutterEngine2
before clearing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your comment, I've made another commit, mind to re-check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
This PR attempts to resolve #78420. I added the clear method as of the suggestion and added a test case to verify my implementation. In the implementation, I just reused the
Map
's clear method to implement this.