View Issue Details

IDProjectCategoryView StatusLast Update
0003497JEDI VCL00 JVCL Componentspublic2006-04-05 05:46
ReporterfoxymopAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.30 
Summary0003497: Memory leak in JvDriveCtrls
DescriptionJvDriveCtrls uses the function SHGetFileInfo, in some instances with the SHGFI_LARGEICON, SHGFI_SMALLICON, SHGFI_ICON which returns an icon handle in the hICON member of the SHFILEINFO structure.

It is not being freed -- this causes a system crash when using JvDriveCtrls to build a list of files/directories on a drive with a very large number of files present.

The info below is taken from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetfileinfo.asp

"If SHGetFileInfo returns an icon handle in the hIcon member of the SHFILEINFO structure pointed to by psfi, you are responsible for freeing it with DestroyIcon when you no longer need it."
TagsNo tags attached.

Activities

obones

2006-02-09 12:43

administrator   ~0008535

Yes, but we use it with the SHGFI_SYSICONINDEX flag, which, to me, means that the Icon is shared and as such should not be destroyed.
However, it may happen that SHGFI_SYSICONINDEX is not always used, in which case there is a potential memory leak.

obones

2006-04-05 05:46

administrator   ~0008965

Ok, SHGFI_ICON was set in three different places, where it should not have been. This is now fixed.

Issue History

Date Modified Username Field Change
2006-02-08 10:28 foxymop New Issue
2006-02-09 12:43 obones Note Added: 0008535
2006-02-09 12:43 obones Status new => feedback
2006-04-05 05:46 obones Status feedback => resolved
2006-04-05 05:46 obones Resolution open => fixed
2006-04-05 05:46 obones Assigned To => obones
2006-04-05 05:46 obones Note Added: 0008965