[Qt-interest] QFileIconProvider "leaks" DLL's (qgifd4.dll, qicod4.dll, QtSvgd4.dll, etc.)

Niels Dekker - no return address noreply at this.is.invalid
Tue Aug 18 19:20:24 CEST 2009


QFileIconProvider loads some DLL files that aren't unloaded anymore. 
When I step over the QFileIconProvider constructor in the debugger (MSVC 
2008), I get the following debug output:

 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qgifd4.dll'
 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qicod4.dll'
 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qjpegd4.dll'
 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qmngd4.dll'
 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qsvgd4.dll'
 'Foo.exe': Loaded 'C:\Qt\4.5.2\bin\QtSvgd4.dll', Symbols loaded.
 'Foo.exe': Loaded 'C:\Qt\4.5.2\plugins\imageformats\qtiffd4.dll'

Those DLL's remain in memory, and thereby, QtGui4.DLL and QtCore4.dll 
also remain there. Is that a bug? Shouldn't the destructor of 
QFileIconProvider unload those DLL's?  Or should I unload those DLL's 
myself, after using QFileIconProvider, in my own code?  (If so, how 
should I do so?)

It appears that the DLL's are loaded inside QFileIconProviderPrivate(), 
when it does:
  trashcan = style->standardIcon(QStyle::SP_TrashIcon);
(In "C:\Qt\4.5.2\src\gui\itemviews\qfileiconprovider.cpp")


Hope you can help, Niels


PS I think this is related to my previous posting, "[Qt-interest] 
QtGui4.dll and QtCore4.dll don't unload,when using QFileSystemModel!", 
http://lists.trolltech.com/pipermail/qt-interest/2009-August/011488.html

--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center




More information about the Qt-interest-old mailing list