Hi,
i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about
there.
Now when I scroll up and down repeatedly using the vertical scrollbar, I see
the number of GDI object grow rapidly. Now and then it drops again to about
60 which is reasonable.When this number reaches 10.000, all of a sudden, it
turns into 4.294.964.397 (more or less).
Running the garbage collector manually does not help anymore then.
I also noticed that when I run the garbage collector (manually) *before* the
number reaches 10.000 this problem does not occur.
What is going wrong here ? I'm not doing any custom drawing, I don't even
use another backcolor, font or whatever. Why does it allocate so many GDI
objects. If I wrote something like a ListView, I would cache some or all of
the pens and brushes, as in most cases all the rows have similar properties
(color, font, ...).
I must be missing something. Anybody a clue ?
Thanks in advance.
Greetings,
Bram.