Browse Source
* Fix undisposed PointerEvent JSObject on browser pointer move OnPointerMove dropped argsObj (the JSObject wrapping the native DOM PointerEvent) without disposing it, except inside a Lazy factory only evaluated when GetIntermediatePoints() is called - which doesn't happen for ordinary moves/hover. Without explicit Dispose(), release requires two steps: Mono GC must collect the abandoned JSObject wrapper to release its JS handle, then V8 can reclaim the underlying JS object. Verified with a standalone FinalizationRegistry-based repro that Mono GC does not trigger on its own under continuous pointermove-like allocation pressure, so undisposed objects pile up - not a permanent leak though. Fix by disposing argsObj in a finally block after routing, guaranteeing deterministic release instead of depending on GC timing. Coalesced-event resolution (GetCoalescedEvents) is unaffected since it only runs synchronously within the same call when a consumer needs it. * Updated comments * Update src/Browser/Avalonia.Browser/BrowserInputHandler.cs Co-authored-by: Max Katz <maxkatz6@outlook.com> * Return empty list in lazy if argsObj has been disposed --------- Co-authored-by: Max Katz <maxkatz6@outlook.com>pull/22177/head
committed by
GitHub
1 changed files with 14 additions and 3 deletions
Loading…
Reference in new issue