microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
159.32k stars 27.87k forks source link

Make sure child instantiation service instances are disposed/tracked for disposal #212879

Open jrieken opened 2 weeks ago

jrieken commented 2 weeks ago

Since recently the instantiation service is disposable. A instantiation service will dispose all service instances it has created and will dispose all its children. In return, children should also be explicitly disposed so that they get released from their parents. This item tracks the adoption of registering child instantiation service instances with a disposable.

* This became an issue because we now prevent GC'ing of child service and thereby implicit clean-up. So, while this is more work/tracking it is true disposing of services. Overall, this isn't severe because the vast majority of insta-children are for scoped context key services

jrieken commented 2 weeks ago

Best-guess assignment, please re-assign along the way. A sample adoption is d1fdc09