generator icon indicating copy to clipboard operation
generator copied to clipboard

fix: prevent potential memory leak by properly removing watcher references

Open Aryan4884 opened this issue 1 year ago • 5 comments

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.

Aryan4884 avatar Oct 18 '24 17:10 Aryan4884

⚠️ No Changeset found

Latest commit: bac1a168ebe70b0853832f444824d4eb55d9ad7a

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

changeset-bot[bot] avatar Oct 18 '24 17:10 changeset-bot[bot]

@DhairyaMajmudar I have removed the extra formatting changes.

Aryan4884 avatar Oct 19 '24 10:10 Aryan4884

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

derberg avatar Oct 21 '24 10:10 derberg

No, it is just an observational fix.

Aryan4884 avatar Oct 22 '24 08:10 Aryan4884