Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-11

Bug of TListView

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Vasily I. Volchenko: As it was said, my program generates a lot of unreleased DCs. But TListView seems to do…
Show quoted text 8 lines
As it was said, my program generates a lot of unreleased DCs. But TListView seems to do so anyway. I tested it the following way: form with listview, button. bitbtn and imagelist. On creation: imagelist loads bitmap from fitbtn (kind=abort). Then on button click an item with image is added. Each image occupies 1 unreleased dc and 6 gdiobjects (as I remember). Without images all works OK.

Hmm. I will check it ...

Besides it seems that DCs aren't freed automatically (just warned).

That's right. This way you can easily see with heaptrc where they were created.

Mattias

Reply by email

Mattias Gaertner
to Vasily I. Volchenko: As it was said, my program generates a lot of unreleased DCs. But TListView seems to do…
Show quoted text 8 lines
As it was said, my program generates a lot of unreleased DCs. But TListView seems to do so anyway. I tested it the following way: form with listview, button. bitbtn and imagelist. On creation: imagelist loads bitmap from fitbtn (kind=abort). Then on button click an item with image is added. Each image occupies 1 unreleased dc and 6 gdiobjects (as I remember). Without images all works OK.

I have fixed the unreleased DCs.
But TCustomImageList and TBitmap are not complete and so you can't do everything that you can do under Delphi. We have still no resource management. And transparent icons need some tricks. We can't copy the VCL code, because this is very win32 specific (and also not very fast).
I can't say, when this will be implemented. I'm currently busy with the IDE idle tasks.

Mattias

Show quoted text 6 lines
Besides it seems that DCs aren't freed automatically (just warned). _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Vasily I. Volchenko

As it was said, my program generates a lot of unreleased DCs. But TListView seems to do so anyway.
I tested it the following way: form with listview, button. bitbtn and imagelist.
On creation: imagelist loads bitmap from fitbtn (kind=abort). Then on button click an item with image is added.
Each image occupies 1 unreleased dc and 6 gdiobjects (as I remember). Without images all works OK.
Besides it seems that DCs aren't freed automatically (just warned).

Reply by email