Skip to content

Dispose services #523

Answered by CGNonofr
Nuthin2do asked this question in Q&A
Oct 23, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Unfortunately, that's not something that is possible for multiples reasons:

  • This is not needed for VSCode, so no effort was done toward that direction
  • Some services register global stuff (like onbeforeunload, or create workers....) and nothing exists to unregister them
  • Most of the code is actually what is called "contributions". Some classes in which services are injected and that can't be unloaded

So I see 2 solutions:

  • if you don't need the service configuration to change: you can just make sure your services are only initialized once before the first time you need it
  • if you want to update the service configuration: you have no other choice than reloading the page. It includes the pos…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Nuthin2do
Comment options

@vitor-txt
Comment options

@CGNonofr
Comment options

Answer selected by Nuthin2do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants