mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Retain a reference to the CFRunLoop until MessageLoopDarwin::Terminate exits (flutter/engine#34735)
This commit is contained in:
parent
d3ff892b07
commit
23d5f04e7b
@ -63,7 +63,12 @@ void MessageLoopDarwin::Run() {
|
||||
|
||||
void MessageLoopDarwin::Terminate() {
|
||||
running_ = false;
|
||||
CFRunLoopStop(loop_);
|
||||
|
||||
// Ensure that the CFRunLoop remains alive through the end of this function
|
||||
// even if the loop's thread exits and drops its reference to the loop.
|
||||
CFRef<CFRunLoopRef> local_loop(loop_);
|
||||
|
||||
CFRunLoopStop(local_loop);
|
||||
}
|
||||
|
||||
void MessageLoopDarwin::WakeUp(fml::TimePoint time_point) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user