Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent potential memory leak by properly removing watcher references #1307

Closed
wants to merge 5 commits into from

Conversation

Aryan4884
Copy link

Description

This PR addresses a potential memory leak issue in the Watcher class. When a watcher is closed, the reference to the watcher was previously set to null but not removed from the this.watchers object. Over time, this could lead to unnecessary memory consumption/memory leak.

Copy link

changeset-bot bot commented Oct 18, 2024

⚠️ No Changeset found

Latest commit: bac1a16

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Aryan4884 Aryan4884 changed the title Fix: prevent potential memory leak by properly removing watcher references fix: prevent potential memory leak by properly removing watcher references Oct 18, 2024
Copy link
Contributor

@DhairyaMajmudar DhairyaMajmudar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some unwanted formating changes which can further cause format workflow failure, can you pls. remove them by running the script npm run lint:fix

@Aryan4884
Copy link
Author

@DhairyaMajmudar I have removed the extra formatting changes.

@derberg
Copy link
Member

derberg commented Oct 21, 2024

was this an issue coming from sonarcloud? of yes, please indicate it in description and provide to sonar report

Copy link

sonarcloud bot commented Oct 22, 2024

@Aryan4884
Copy link
Author

No, it is just an observational fix.

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then I will close this issue, watcher is used in CLI only and we will deprecate it in few days and it doesn't make sense to invest in any changes to it

@derberg derberg closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants