[Qt-interest] QtGui4.dll and QtCore4.dll don't unload, when using QFileSystemModel!
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Tue Aug 18 12:51:17 CEST 2009
What you are probably seeing, is that QT's gui and core libraries have
static global objects. Which even when you unload what you are actually
using (the model) the statics are still around, and thus the core and
gui DLLs don't unload.
That's my guess anyway...
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Niels Dekker -
no return address
Sent: Tuesday, August 18, 2009 3:08 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QtGui4.dll and QtCore4.dll don't unload,when
using QFileSystemModel!
We're developing a DLL, "OurWidget.dll", containing a widget derived
from a Qt4 QMainWindow. The user of the DLL does not need to use Qt
directly. MFC applications and console applications can just link to
"OurWidget.dll", which will indirectly load the necessary Qt DLL's:
QtGui4.DLL, QtCore4.dll, and QtXml4.dll. Our widget has a tree view,
ourTreeView, which may have a model of type QFileSystemModel.
Now when our widget has indeed used a QFileSystemModel while it is
loaded, "QtGui4.DLL" and "QtCore4.dll" will not unload anymore,
afterwards! Not even when the "OurWidget.dll" is unloaded!
("QtXml4.dll" is unloaded properly, though.) Moreover, the application
may become unstable afterwards!
Is this a known issue of QFileSystemModel? Is there a workaround?
We're using Qt 4.5.2, and our "OurWidget.dll" links at compile-time
("early binding") to QtGui4.lib, QtCore4.lib, and QtXml4.lib. We
monitored loading and unloading of DLL's by Dependency Walker
(www.dependencywalker.com).
Hope you can help,
Niels
--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list