Skip to content

Add disposables to context.subscriptions#150

Merged
fbricon merged 1 commit intoredhat-developer:masterfrom
xorye:disposable
Nov 12, 2019
Merged

Add disposables to context.subscriptions#150
fbricon merged 1 commit intoredhat-developer:masterfrom
xorye:disposable

Conversation

@xorye
Copy link
Copy Markdown
Contributor

@xorye xorye commented Nov 12, 2019

This PR adds disposables to context.subscriptions instead of a separate array that is manually disposed of in the deactivate() function.

The contents of context.subscriptions are automatically disposed of when the extension is deactivated. Source

Signed-off-by: David Kwon dakwon@redhat.com

Signed-off-by: David Kwon <dakwon@redhat.com>
@xorye
Copy link
Copy Markdown
Contributor Author

xorye commented Nov 12, 2019

And notably, this PR deals with the debug.onDidTerminateDebugSession disposable properly.

Instead of doing:
disposables.push(debug.onDidTerminateDebugSession(() => {}, null, disposables));

this PR does:
context.subscriptions.push(debug.onDidTerminateDebugSession(() => {}));

@fbricon fbricon merged commit b4bf87b into redhat-developer:master Nov 12, 2019
@fbricon fbricon added the debt label Nov 12, 2019
@fbricon fbricon added this to the 1.2.0 milestone Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants