DeleteObject() private method

private DeleteObject ( IntPtr obj ) : bool
obj System.IntPtr
return bool
Ejemplo n.º 1
0
        public void Dispose()
        {
            if (isDisposed)
            {
                return;
            }

            if (hRgn != IntPtr.Zero)
            {
                MyWin32.DeleteObject(hRgn);
                hRgn = IntPtr.Zero;
            }


            MyWin32.ReleaseMemoryHdc(memHdc, dib);
            dib        = IntPtr.Zero;
            memHdc     = IntPtr.Zero;
            isDisposed = true;
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (_isDisposed)
            {
                return;
            }

            if (_hRgn != IntPtr.Zero)
            {
                MyWin32.DeleteObject(_hRgn);
                _hRgn = IntPtr.Zero;
            }


            MyWin32.ReleaseMemoryHdc(_memHdc, _dib);
            _dib        = IntPtr.Zero;
            _memHdc     = IntPtr.Zero;
            _isDisposed = true;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Release the given memory HDC and dib section created from <see cref="CreateMemoryHdc"/>.
 /// </summary>
 /// <param name="memoryHdc">Memory HDC to release</param>
 /// <param name="dib">bitmap section to release</param>
 public static void ReleaseMemoryHdc(IntPtr memoryHdc, IntPtr dib)
 {
     MyWin32.DeleteObject(dib);
     MyWin32.DeleteDC(memoryHdc);
 }