Пример #1
0
        public override void Dispose()
        {
            if (_bitmapContext != null)
            {
                _bitmapContext.Dispose();
                _bitmapContext = null;
            }

            if (_canvas != null)
            {
                _canvas.Dispose();
                _canvas = null;
            }

            try
            {
                NativeFontService.Instance.ClearFontCache();
            }
            catch (Exception exc)
            {
                Logger.Warn(exc);
            }

            base.Dispose();
        }
Пример #2
0
        public override void Dispose()
        {
            base.Dispose();
            Close();

            try
            {
                _canvas?.Dispose();
                _context?.Dispose();
            }
            catch (Exception exc)
            {
                Logger.Warn(exc);
            }
        }