diff --git a/modules/core/src/lib/deck.ts b/modules/core/src/lib/deck.ts index 3c30f5c30fe..b9ab910905a 100644 --- a/modules/core/src/lib/deck.ts +++ b/modules/core/src/lib/deck.ts @@ -474,6 +474,10 @@ export default class Deck { this.canvas.parentElement?.removeChild(this.canvas); this.canvas = null; } + + if (!this.props.device && !this.props.gl) { + this._canvasContext?.destroy(); + } this._canvasContext = null; }