-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: remove unused variables #2086
Conversation
@@ -38,10 +37,6 @@ export class AppComponent implements OnInit, OnDestroy { | |||
} | |||
} | |||
|
|||
ngOnDestroy(): void { | |||
this._localizationService.destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, destroying services is a good practice to avoid memory leaks and reset the state. If this service doesn't have any active subscriptions then it is ok to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Base service should contain a common code for all services. Currently, it only has isDestroyed subject which should be used at the component level to check if the service was destroyed after a tab was closed or the page was refreshed, mostly for subscriptions. Sentry indicates that we have a lot of those kind of leaks and we should keep reducing them. So instead of deleting it, I suggest thinking about in which services we should use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base service has been deleted, cause not used
…ist-values-leads-to-randomly * main: chore(deps-dev): bump prettier from 3.4.2 to 3.5.0 (#2094) chore(deps-dev): bump @typescript-eslint/utils from 8.22.0 to 8.24.0 (#2099) chore(deps): bump the grafana-deps group across 1 directory with 2 updates (#2100) chore: add CODEOWNERS file (#2095) fix: update footnote plugin (ckeditor5) to 2.1.5 (#2096) chore: add tsc command to nx projects (#2097) chore(main): release 11.25.1 (#2083) fix: footnotes escape html only once (#2088) fix: selected region click only fires when a region iri is found (#2089) refactor: remove unused variables (#2086) # Conflicts: # package-lock.json
resolves DEV-