public void SomeDataIsArrived() { if (_strongRefreshHandler == null) { _strongRefreshHandler = new StrongRefreshHandler(() => { _canvas.Refresh(enumRefreshType.All); if (_someDataIsArrivedHandler != null) { _someDataIsArrivedHandler(this, null); } }); } if (_canvas != null && _canvas.Container != null && !_canvas.Container.IsDisposed) { _canvas.Container.Invoke(_strongRefreshHandler); } }
public override void Dispose() { _isDisposed = true; if (_mapRuntime != null) { DisposeMap(); _mapRuntime.Dispose(); //_mapRuntime = null; } if (_buffer != null) { _buffer.Dispose(); _buffer = null; } _onCanvasSizeChanged = null; _someDataIsArrivedHandler = null; _strongRefreshHandler = null; _renderArgs = null; _canvas = null; base.Dispose(); }