Skip to content

Replace Disposable[] with DisposableStore#80447

Merged
mjbvz merged 4 commits intomicrosoft:masterfrom
solomatov:first-pr-vscode
Sep 9, 2019
Merged

Replace Disposable[] with DisposableStore#80447
mjbvz merged 4 commits intomicrosoft:masterfrom
solomatov:first-pr-vscode

Conversation

@solomatov
Copy link
Contributor

See #74250 for details.

@solomatov
Copy link
Contributor Author

If it's ok, I can do more of it. There aren't that many usages of Disposable[] as a DisposableStore.

@solomatov
Copy link
Contributor Author

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.

}

this.cache = new RowCache(this.renderers);
this.cache = this.disposables.add(new RowCache(this.renderers));
Copy link
Collaborator

@mjbvz mjbvz Sep 9, 2019

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)

Copy link
Collaborator

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

@mjbvz mjbvz added this to the September 2019 milestone Sep 9, 2019
@mjbvz mjbvz merged commit d163340 into microsoft:master Sep 9, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 9, 2019

Thanks. We would take other PRs like this. Please just keep each PR small and isolated so they are easy to review

@solomatov solomatov deleted the first-pr-vscode branch September 12, 2019 01:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants