46 references to HandleCollector
System.Drawing (46)
commonui\System\Drawing\Advanced\Gdiplus.cs (19)
3927
return System.Internal.
HandleCollector
.Add(IntCreateCompatibleBitmap(hDC, width, height), SafeNativeMethods.CommonHandles.GDI);
3939
return System.Internal.
HandleCollector
.Add(IntCreateBitmap(width, height, planes, bpp, bitmapData), SafeNativeMethods.CommonHandles.GDI);
3984
return System.Internal.
HandleCollector
.Add(IntCreateDIBSection(hdc, ref bmi, iUsage, ref ppvBits, hSection, dwOffset), SafeNativeMethods.CommonHandles.GDI);
4062
return System.Internal.
HandleCollector
.Add(IntCreateRectRgn(x1, y1, x2, y2), SafeNativeMethods.CommonHandles.GDI);
4690
public static readonly int Accelerator = System.Internal.
HandleCollector
.RegisterType("Accelerator", 80, 50);
4696
public static readonly int Cursor = System.Internal.
HandleCollector
.RegisterType("Cursor", 20, 500);
4702
public static readonly int EMF = System.Internal.
HandleCollector
.RegisterType("EnhancedMetaFile", 20, 500);
4708
public static readonly int Find = System.Internal.
HandleCollector
.RegisterType("Find", 0, 1000);
4714
public static readonly int GDI = System.Internal.
HandleCollector
.RegisterType("GDI", 50, 500);
4721
public static readonly int HDC = System.Internal.
HandleCollector
.RegisterType("HDC", 100, 2); // wait for 2 dc's before collecting
4727
public static readonly int Icon = System.Internal.
HandleCollector
.RegisterType("Icon", 20, 500);
4733
public static readonly int Kernel = System.Internal.
HandleCollector
.RegisterType("Kernel", 0, 1000);
4739
public static readonly int Menu = System.Internal.
HandleCollector
.RegisterType("Menu", 30, 1000);
4745
public static readonly int Window = System.Internal.
HandleCollector
.RegisterType("Window", 5, 1000);
4780
System.Internal.
HandleCollector
.Remove((IntPtr)hObject, SafeNativeMethods.CommonHandles.GDI);
4813
return System.Internal.
HandleCollector
.Add(IntCreateIconFromResourceEx(pbIconBits, cbIconBits, fIcon, dwVersion, csDesired, cyDesired, flags), SafeNativeMethods.CommonHandles.Icon);
4823
return System.Internal.
HandleCollector
.Add(IntExtractAssociatedIcon(hInst, iconPath, ref index), SafeNativeMethods.CommonHandles.Icon);
4848
System.Internal.
HandleCollector
.Remove((IntPtr)hIcon, SafeNativeMethods.CommonHandles.Icon);
4867
return System.Internal.
HandleCollector
.Add(IntCopyImage(hImage, uType, cxDesired, cyDesired, fuFlags), handleType);
commonui\System\Drawing\UnsafeNativeMethods.cs (4)
35
return System.Internal.
HandleCollector
.Add(IntGetDC(hWnd), SafeNativeMethods.CommonHandles.HDC);
42
System.Internal.
HandleCollector
.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.GDI);
50
System.Internal.
HandleCollector
.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.HDC);
98
return System.Internal.
HandleCollector
.Add(IntCreateCompatibleDC(hDC), SafeNativeMethods.CommonHandles.GDI);
misc\DebugHandleTracker.cs (2)
45
System.Internal.
HandleCollector
.HandleAdded += new System.Internal.HandleChangeEventHandler(tracker.OnHandleAdd);
46
System.Internal.
HandleCollector
.HandleRemoved += new System.Internal.HandleChangeEventHandler(tracker.OnHandleRemove);
misc\GDI\SafeNativeMethods.cs (7)
42
public static readonly int EMF = System.Internal.
HandleCollector
.RegisterType("EnhancedMetaFile", 20, 500);
47
public static readonly int GDI = System.Internal.
HandleCollector
.RegisterType("GDI", 90, 50);
53
public static readonly int HDC = System.Internal.
HandleCollector
.RegisterType("HDC", 100, 2); // wait for 2 dc's before collecting
65
IntPtr hBrush = System.Internal.
HandleCollector
.Add(IntCreateSolidBrush(crColor), IntSafeNativeMethods.CommonHandles.GDI);
79
IntPtr hPen = System.Internal.
HandleCollector
.Add(IntCreatePen(fnStyle, nWidth, crColor), IntSafeNativeMethods.CommonHandles.GDI);
91
IntPtr hPen = System.Internal.
HandleCollector
.Add(IntExtCreatePen(fnStyle, dwWidth, lplb, dwStyleCount, lpStyle), IntSafeNativeMethods.CommonHandles.GDI);
105
IntPtr hRgn = System.Internal.
HandleCollector
.Add(IntCreateRectRgn(x1, y1, x2, y2), IntSafeNativeMethods.CommonHandles.GDI);
misc\GDI\UnsafeNativeMethods.cs (9)
43
IntPtr hdc = System.Internal.
HandleCollector
.Add(IntGetDC(hWnd), IntSafeNativeMethods.CommonHandles.HDC);
56
System.Internal.
HandleCollector
.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.GDI);
62
System.Internal.
HandleCollector
.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC);
72
System.Internal.
HandleCollector
.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC);
86
IntPtr hdc = System.Internal.
HandleCollector
.Add(IntCreateDC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC);
100
IntPtr hdc = System.Internal.
HandleCollector
.Add(IntCreateIC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC);
116
IntPtr compatibleDc = System.Internal.
HandleCollector
.Add(IntCreateCompatibleDC(hDC), IntSafeNativeMethods.CommonHandles.GDI);
242
IntPtr hFont = System.Internal.
HandleCollector
.Add(IntCreateFontIndirect(lf), IntSafeNativeMethods.CommonHandles.GDI);
253
System.Internal.
HandleCollector
.Remove((IntPtr)hObject, IntSafeNativeMethods.CommonHandles.GDI);
misc\GDI\WindowsRegion.cs (1)
83
System.Internal.
HandleCollector
.Add(hRegion, IntSafeNativeMethods.CommonHandles.GDI);
misc\HandleCollector.cs (4)
157
if (
HandleCollector
.HandleAdded != null) {
158
HandleCollector
.HandleAdded(name, handle, currentCount);
258
if (
HandleCollector
.HandleRemoved != null) {
259
HandleCollector
.HandleRemoved(name, handle, currentCount);