GDI leaks?

  • Thread starter Thread starter John.Luckowsky
  • Start date Start date
J

John.Luckowsky

Hello all,

I've just found the issue that really scares me. It seems that ListView
doesn't release some GDI objects. Here you are steps to reproduce the
problem:

1. Run Task Manager
2. View->Select Columns
3. Check "GDI Objects", press OK
4. Run Visual Studio 2k3
5. Create new Window Forms application
6. Put into the form "ListView" and enter 5 items.
7. Run Application
8. Force application to refresh (e.g. move another window above this
application)

You will see that GDI objects increase really fast. The same situation
with Add/Remove items, GDI objects still increas. I've noticed that I
can increase it number even till 10k and after that application starts
to glitch.

It seems that the problem can be solved after:

GC.Colelct();

But this is *really* bad solution which significant impacts to the
performance of application.

Any ideas?

Thank you,
John
 
Back
Top