Correctly dispose of Renderer and ScreenDprMonitor

This commit is contained in:
Daniel Imms
2018-06-21 10:49:03 +10:00
parent 5adf962eb5
commit ede1d5f7c8
5 changed files with 18 additions and 3 deletions
+3 -2
View File
@@ -4,7 +4,7 @@
*/
import { ITerminal } from '../Types';
import { IEventEmitter, ITheme } from 'xterm';
import { IEventEmitter, ITheme, IDisposable } from 'xterm';
import { IColorSet } from '../shared/Types';
/**
@@ -24,10 +24,11 @@ export const enum FLAGS {
* Note that IRenderer implementations should emit the refresh event after
* rendering rows to the screen.
*/
export interface IRenderer extends IEventEmitter {
export interface IRenderer extends IEventEmitter, IDisposable {
dimensions: IRenderDimensions;
colorManager: IColorManager;
dispose(): void;
setTheme(theme: ITheme): IColorSet;
onWindowResize(devicePixelRatio: number): void;
onResize(cols: number, rows: number): void;