mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Ensure that the engine is destroyed when 'EngineBindings.detach' in the multiple_flutters example on Android (#969)
This commit is contained in:
@@ -74,8 +74,7 @@ class EngineBindings(activity: Activity, delegate: EngineBindingsDelegate, entry
|
||||
* This tears down the messaging connections on the platform channel and the DataModel.
|
||||
*/
|
||||
fun detach() {
|
||||
// TODO: Uncomment after https://github.com/flutter/engine/pull/24644 is on stable.
|
||||
// engine.destroy();
|
||||
engine.destroy();
|
||||
DataModel.instance.removeObserver(this)
|
||||
channel.setMethodCallHandler(null)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user