Skip to content

[CP] Clear watcher subscriptions to avoid leaking package:watcher data #52791

@srawlins

Description

@srawlins

Commit(s) to merge

5aee0f6

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/311466

Issue Description

Prior to this fix, there is a fairly significant memory leak in the Dart analyzer that increases used memory when edits to a pubspec.yaml file are made. This fix closes the leak.

What is the fix

The fix is to cancel subscriptions more aggresively.

Why cherry-pick

This memory leak represents a big area of complaint for existing users.

Risk

low

Issue link(s)

#52447

Extra Info

No response

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions