-
Notifications
You must be signed in to change notification settings - Fork 43
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
[ffigen] Release all ObjC references on the main thread #1603
Conversation
This reverts commit 75fb5dd.
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
Package publish validation ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
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.
LGTM!
Certain objects (typically the UI APIs) can only be destroyed on the main thread. Since there's no way of telling which objects have this restriction, we just dispatch all release calls to the main thread.
Fixes: #1470
Notes:
objc_release(peer)
call to the main thread using ObjC'sdispatch_async(dispatch_get_main_queue(), ...)
API, unless we're already on the main thread.