1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Ensure that the engine is destroyed when 'EngineBindings.detach' in the multiple_flutters example on Android (#969)

This commit is contained in:
ColdPaleLight
2022-01-05 05:13:42 +08:00
committed by GitHub
parent 5b0a6be873
commit 296fbac814

View File

@@ -74,8 +74,7 @@ class EngineBindings(activity: Activity, delegate: EngineBindingsDelegate, entry
* This tears down the messaging connections on the platform channel and the DataModel. * This tears down the messaging connections on the platform channel and the DataModel.
*/ */
fun detach() { fun detach() {
// TODO: Uncomment after https://github.com/flutter/engine/pull/24644 is on stable. engine.destroy();
// engine.destroy();
DataModel.instance.removeObserver(this) DataModel.instance.removeObserver(this)
channel.setMethodCallHandler(null) channel.setMethodCallHandler(null)
} }