mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Make sure we dispose of markdown preview on webview dispose
This commit is contained in:
parent
4d95590a81
commit
b34585bc6d
|
@ -303,7 +303,7 @@ class MarkdownPreview {
|
|||
});
|
||||
|
||||
this.webview.onDidDispose(() => {
|
||||
this._onDisposeEmitter.fire();
|
||||
this.dispose();
|
||||
}, null, this.disposables);
|
||||
|
||||
this.webview.onDidReceiveMessage(e => {
|
||||
|
@ -328,6 +328,8 @@ class MarkdownPreview {
|
|||
public readonly onDispose = this._onDisposeEmitter.event;
|
||||
|
||||
public dispose() {
|
||||
this._onDisposeEmitter.fire();
|
||||
|
||||
this._onDisposeEmitter.dispose();
|
||||
this.webview.dispose();
|
||||
|
||||
|
|
Loading…
Reference in a new issue