message: Fix a memory management bug which prevented saving memory from off screen canvases
  This problem resulted in large memory use and very slow updates when changing
  text size, DPI, and other attributes of the terminal text.
diff: @@ -28,6 +28,7 @@ export class TerminalCanvasRenderer extends Renderer {
  private _canvasTextLayer: CanvasTextLayer;
  private _terminalCanvasRendererConfig: TerminalCanvasRendererConfig = null;
  private _canvasFontMetricsMonitor: CanvasFontMetricsMonitor = null;
  + private _isLowMemoryMode = false;
  constructor(container: HTMLElement, terminalCanvasRendererConfig: TerminalCanvasRendererConfig) {
  super(container, { injectCss: false, fontSize: null });
  @@ -71,8 +72,10 @@ export class TerminalCanvasRenderer extends Renderer {
  if (this._canvasFontMetricsMonitor != null) {
  this._canvasFontMetricsMonitor.setTerminalCanvasRendererConfig(terminalCanvasRendererConfig);
  }
  + if ( ! this._isLowMemoryMode) {
  this.rerenderText();
  }
  + }
  setRenderCursorStyle(cursorStyle: CursorStyle): void {
  if (this._canvasTextLayer != null) {
  @@ -80,13 +83,21 @@ export class TerminalCanvasRenderer extends Renderer {
  }
  }
  + /**
  + * Free up the canvas memory
  + *
  + * The canvas memory will remain freed until an explicit request to
  + * rerender the text is given.
  + */
  reduceMemory(): void {
  + this._isLowMemoryMode = true;
  if (this._canvasTextLayer != null) {
  this._canvasTextLayer.reduceMemory();
  }
  }
  rerenderText(): void {
  + this._isLowMemoryMode = false;
  if (this._canvasTextLayer != null) {
  this._canvasTextLayer.rerender();
  }
  