What is the best way to track and reduce GD descriptors?

What is the best way to track and reduce GDI window handles.,

+3
source share
6 answers

Personally, I use IARSN TaskInfo to see the number of handles of my program, including GDI. As for reducing the number of active pens, I would see what uses descriptors in your application.

Things like (but not limited to):

  • Pens
  • Bitmaps
  • Controls (I don't think they all use descriptors)

?

+2

. GDI win32 api

+1

. google. , , .NET-.

, .

+1

GDI, GDIView Nirsoft. , , GDI (Pen, Brush, Bitmap, Font, DC,...) .

+1

- " GDI"

When I suspect that I have GDI descriptor leaks, I usually run the leak script once, force the garbage collection, look at the task manager, run the action again with gc and check the difference. If I find it, I used .Net Profiler profiles (from SciTech), which can show in detail which object causes a leak and why it is not transferred.

0
source

All Articles