[CP] [vm] Fix leakage of file system watcher related data structures #52793
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-merged
Cherry-pick has been merged to the stable or beta branch.
cherry-pick-review
Issue that need cherry pick triage to approve
Commit(s) to merge
3dd9389
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/311521
Issue Description
Without this fix, there is a bad leak of
_Closure
objects when using overlappingDirectory.watch
streams. This change switches aStream.pipe
usage toStream.listen
, and cancels subscriptions.What is the fix
The fix is to change how these watch events are listened to, and canceling subscriptions.
Why cherry-pick
This memory leak can be very prevalent in the Dart analyzer, and memory usage (including leaks) is a top issue for users of Dart analyzer.
Risk
low
Issue link(s)
#52703
Extra Info
No response
The text was updated successfully, but these errors were encountered: