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
Guest finalizers re-populate swept per-ALC caches during unload #24075
ExitAlcApplication() sweeps the per-ALC static caches, but guest DependencyObject finalizers still run afterwards, during AssemblyLoadContext.Unload(), and can re-populate the shared property-system caches.
Observed via heap dump as a guest ControlExtensions attached-property entry re-rooting the dying ALC after the sweep had already run. The sweep is correct at the moment it runs; the finalizers simply run later.
Expected behavior
Once a secondary-ALC app has exited and its finalizers have drained, no shared property-system cache holds entries originating from that context, without the host having to sweep a second time.
How to fix
Either re-run (or defer) the non-default-ALC cache sweep after the unloading context's finalizers have drained, or make the caches ignore registrations originating from an ALC that is already unloading.
Reproduced against Uno.Sdk.Private6.7.0-dev.815 (artifacts/uno @ 21bf1ad6), Skia desktop (X11 + Win32) and browserwasm, hosting the three Uno.Themes sample heads as secondary-ALC guests through AlcContentHost / WindowHelper.ContentHostOverride.
Activity
fix(samples): repair the post-unload ALC cache sweep for Uno 7