-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Replace Disposable[] with DisposableStore #80447
Conversation
If it's ok, I can do more of it. There aren't that many usages of Disposable[] as a DisposableStore. |
And what do you think about more of such contributions? I want to learn the codebase, and such changes are a good way to learn about it. |
@@ -214,7 +214,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable { | |||
this.renderers.set(renderer.templateId, renderer); | |||
} | |||
|
|||
this.cache = new RowCache(this.renderers); | |||
this.cache = this.disposables.add(new RowCache(this.renderers)); |
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.
Make sure to call this.disposables.clear()
before adding the new entries. This resets the store (which is what the re-assignment previously was simulating)
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.
Actually never mind. I see this is in the constructor so it's not required
Thanks. We would take other PRs like this. Please just keep each PR small and isolated so they are easy to review |
See #74250 for details.