fix: complete does not destroy engine on close (#21943)
* fix: complete does not destroy engine on close * reset flutterApi on cleanup --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>pull/21649/head^2
parent
0166e99d90
commit
d38468439b
|
|
@ -133,7 +133,6 @@ class BackgroundWorker: BackgroundWorkerBgHostApi {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
isComplete = true
|
|
||||||
flutterApi?.cancel { result in
|
flutterApi?.cancel { result in
|
||||||
self.complete(success: false)
|
self.complete(success: false)
|
||||||
}
|
}
|
||||||
|
|
@ -174,6 +173,7 @@ class BackgroundWorker: BackgroundWorkerBgHostApi {
|
||||||
|
|
||||||
isComplete = true
|
isComplete = true
|
||||||
engine.destroyContext()
|
engine.destroyContext()
|
||||||
|
flutterApi = nil
|
||||||
completionHandler(success)
|
completionHandler(success)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue