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

Add disposables to context.subscriptions #150

Merged
merged 1 commit into from
Nov 12, 2019
Merged

Add disposables to context.subscriptions #150

merged 1 commit into from
Nov 12, 2019

Conversation

xorye
Copy link
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
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.

None yet

3 participants