asyncapi / generator

Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
https://asyncapi.com/docs/tools/generator
Apache License 2.0
767 stars 232 forks source link

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

Closed Aryan4884 closed 2 weeks ago

Aryan4884 commented 4 weeks ago

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.

changeset-bot[bot] commented 4 weeks ago

⚠️ 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

Aryan4884 commented 4 weeks ago

@DhairyaMajmudar I have removed the extra formatting changes.

derberg commented 3 weeks ago

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

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Aryan4884 commented 3 weeks ago

No, it is just an observational fix.