void dispose()

Call the dispose method to release memory allocated by WebGL.

Source

void dispose() {

  if (_renderingContext != null && _texture != null) {
    _renderingContext.deleteTexture(_texture);
  }

  _texture = null;
  _source = null;
  _canvas = null;
  _renderingContext = null;
  _contextIdentifier = -1;
  _globalFrameListeners.remove(_onGlobalFrame);
}