You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4f55eae
Browse filesBrowse the repository at this point in the historyBrowse files
Release handles and revoke callbacks when a GC runtime shuts down
Dart frees handles with a Finalizer, which never runs when an isolate group
shuts down, so on a Flutter hot restart everything the old isolate created
stayed alive: tray icons piled up (leanflutter/tray_manager#106). The core
also kept calling the old isolate's NativeCallables, which died with it, and
crashed on the next event that reached one.
native_handle_finalize(void*) releases any handle for a native finalizer,
always posted to the main thread. native_user_data_revoke(void*) marks a
user_data whose runtime is gone: the generated glue checks revoked() before
every callback call, a revoked async listener casts no vote, and its holder
skips the release. The revocation set is never destroyed, since holders
still let go during static destruction at exit.
0 commit comments