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

            MyWin32.DeleteDC(originalHdc);
            originalHdc = IntPtr.Zero;
            MyWin32.DeleteObject(hbmp);
            hbmp = IntPtr.Zero;
            clipRectStack.Clear();
            currentClipRect = new System.Drawing.Rectangle(0, 0, this.Width, this.Height);
#if DEBUG
            debug_releaseCount++;
#endif
        }
Beispiel #2
0
 protected override void OnDispose()
 {
     //TODO: review here
     MyWin32.DeleteObject(hfont);
     hfont = IntPtr.Zero;
 }