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

Use MutableDisposable for managing editorStatus items #75378

Merged
merged 1 commit into from Jun 13, 2019

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Jun 13, 2019

The MutableDisposable class helps manage a disposable value that may change over time. I noticed that editorStatus is manually managing its disposable IStatusbarEntryAccessor elements and think MutableDisposable can help here. The class prevents mistakes such as forgetting to dispose of a property before re-assigning it. It also lets us use _register to ensure these values are cleaned up properly when the class is disposed of

The `MutableDisposable` class helps manage a disposable value that may change over time. I noticed that editorStatus was currently manually managing its `IStatusbarEntryAccessor` elements and think `MutableDisposable` can help simplify the code and prevent mistakes, such as forgetting to dispose of a property before re-assigning it
@mjbvz mjbvz requested a review from bpasero June 13, 2019 00:08
@mjbvz mjbvz self-assigned this Jun 13, 2019
@mjbvz mjbvz merged commit 755a69e into master Jun 13, 2019
@bpasero bpasero deleted the dev/mjbvz/use-mutable-disposable-for-editor-status branch June 14, 2019 05:02
@bpasero bpasero added this to the June 2019 milestone Jun 14, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 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.

None yet

2 participants