From f160436df8e4954a13319411ba389f99f60153e8 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Fri, 11 Feb 2022 14:54:01 -0600 Subject: [PATCH] dispose of decoration on dispose of marker --- src/browser/services/DecorationService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/services/DecorationService.ts b/src/browser/services/DecorationService.ts index 9dc4c4ac2..df21d076f 100644 --- a/src/browser/services/DecorationService.ts +++ b/src/browser/services/DecorationService.ts @@ -88,6 +88,7 @@ export class Decoration extends Disposable implements IDecoration { super(); this.x = options.x ?? 0; this._marker = options.marker; + this._marker.onDispose(() => this.dispose()); this.anchor = options.anchor || 'left'; this.width = options.width || 1; this.height = options.height || 1;