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

refactor: remove unused variables #2086

Merged
merged 10 commits into from
Feb 7, 2025
Merged

refactor: remove unused variables #2086

merged 10 commits into from
Feb 7, 2025

Conversation

derschnee68
Copy link
Collaborator

resolves DEV-

@derschnee68 derschnee68 marked this pull request as ready for review February 6, 2025 12:18
@@ -38,10 +37,6 @@ export class AppComponent implements OnInit, OnDestroy {
}
}

ngOnDestroy(): void {
this._localizationService.destroy();
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it does not

Copy link
Contributor

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.

Copy link
Collaborator Author

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

@derschnee68 derschnee68 merged commit 8c72abc into main Feb 7, 2025
14 checks passed
@derschnee68 derschnee68 deleted the julien/clean branch February 7, 2025 17:10
irmastnt added a commit that referenced this pull request Feb 11, 2025
…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
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.

2 participants