[Qt-interest] QFileIconProvider "leaks" DLL's (qgifd4.dll, qicod4.dll, QtSvgd4.dll, etc.)
Andreas Pakulat
apaku at gmx.de
Tue Aug 18 20:36:22 CEST 2009
On 18.08.09 19:20:24, Niels Dekker - no return address wrote:
> 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(),
I don't know about Qt, but in KDE4 it was decided to never unload
plugins because that can potentially break applications as you cannot
know wether there's still some object in the app thats created from the
plugin. So you may be seeing the same thing here, i.e. Qt might be
keeping those plugins on purpose.
Andreas
--
You have an unusual magnetic personality. Don't walk too close to
metal objects which are not fastened down.
More information about the Qt-interest-old
mailing list