Exemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (DC != null && !_nativeHandle.IsNull)
            {
                DC.DeleteObject(_nativeHandle, GdiObjectType.Brush);
                _nativeHandle = default;
            }

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (DC != null && _nativeHandle != IntPtr.Zero)
            {
                DC.DeleteObject(_nativeHandle, GdiObjectType.Brush);

                _nativeHandle = IntPtr.Zero;
            }

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 3
0
        protected virtual void Dispose(bool disposing)
        {
            if (dc != null && nativeHandle != IntPtr.Zero)
            {
                DbgUtil.AssertFinalization(this, disposing);

                dc.DeleteObject(nativeHandle, GdiObjectType.Brush);

                nativeHandle = IntPtr.Zero;
            }

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 4
0
        void Dispose(bool disposing)
        {
            if (_nativeHandle != IntPtr.Zero && _dc != null)
            {
                _dc.DeleteObject(_nativeHandle, GdiObjectType.Pen);
                _nativeHandle = IntPtr.Zero;
            }

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

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 5
0
        void Dispose(bool disposing)
        {
            if (!_nativeHandle.IsNull && _dc != null)
            {
                _dc.DeleteObject(_nativeHandle, GdiObjectType.Pen);
                _nativeHandle = default;
            }

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

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 6
0
        void Dispose(bool disposing)
        {
            if (nativeHandle != IntPtr.Zero && dc != null)
            {
                DbgUtil.AssertFinalization(this, disposing);

                dc.DeleteObject(nativeHandle, GdiObjectType.Pen);
                nativeHandle = IntPtr.Zero;
            }

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

            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }