View Issue Details

IDProjectCategoryView StatusLast Update
0003602JEDI VCL00 JVCL Componentspublic2006-03-22 02:44
ReporterMongooseAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.10 
Target VersionFixed in Version3.30 
Summary0003602: Memory leak in TJvListView
DescriptionI worked on one project and spend few days on searching the damn memory leaks. Finally I found out that main source was TJvListView.
When I update subfields in the way:
JList.Items[i].SubItems[0] := DateToStr(Now + random(500)); // i from 0 to 100
program works fine, but "Process Explorer" indicates increase in total memory usage of my program. I've took original TListView and compared with TJvListView. As a result: TListView works fine and doesn't generate any additional memory, meanwhile TJvListView gets 4-6 Kb during every execution of cycle. Small investigation showed some new "features":
1) memory leaks appear when we just click on row, or we use arrow keys to navigate through it.
2) memory leaks don't appear, when TJvListView is not visible, either by property "Visible" nor hided by other controls, forms e.g.
3) they don't seem to stop
4) TListView works without that leaks.
Additional InformationThere are a test project in attachment, where TListView and TJvListView are compared and use absolutely same code.
One define will help to easily switch between them.

IDE: Borland Studio 2006 Delphi Win32
TagsNo tags attached.

Relationships

related to 0003839 resolvedobones GDI obj leak 

Activities

2006-03-21 13:25

 

ListMemoryLeak.zip (12,313 bytes)

AHUser

2006-03-22 02:44

developer   ~0008714

Fixed in CVS.

The TListView creates GDI fonts but does not release them because (=> GDI handle leak) the cdPostPaint notify is never sent. That's because TJvListView overwrites IsCustomDraw but does not want the cdPostPaint notification by default.
A simple work around is to create an empty OnAdvancedCustomDrawSubItem event handler.

Issue History

Date Modified Username Field Change
2006-03-21 13:25 Mongoose New Issue
2006-03-21 13:25 Mongoose File Added: ListMemoryLeak.zip
2006-03-22 02:44 AHUser Status new => resolved
2006-03-22 02:44 AHUser Resolution open => fixed
2006-03-22 02:44 AHUser Assigned To => AHUser
2006-03-22 02:44 AHUser Note Added: 0008714
2006-07-27 00:56 obones Relationship added related to 0003839