[webkit-dev] QWebNetworkManager triggering a memleak in Qt

Adam Treat treat at kde.org
Thu Jan 3 14:28:49 PST 2008


Hi,

I've checked and this appears to be the case in both Qt 4.3.2 and Qt 4.4 
snapshot...

==7746== 4 bytes in 1 blocks are definitely lost in loss record 5 of 507
==7746==    at 0x4022765: malloc (vg_replace_malloc.c:149)
==7746==    by 0x5CB16C4: qMalloc(unsigned) (qglobal.cpp:1964)
==7746==    by 0x5D7E43C: queuedConnectionTypes(QList<QByteArray> const&) 
(qobject.cpp:67)
==7746==    by 0x5D82E5A: QObject::connect(QObject const*, char const*, 
QObject const*, char const*, Qt::ConnectionType) (qobject.cpp:2567)
==7746==    by 0x80513D2: QObject::connect(QObject const*, char const*, char 
const*, Qt::ConnectionType) const (qobject.h:291)
==7746==    by 0x4B38C6C: QWebNetworkManager::QWebNetworkManager() 
(qwebnetworkinterface.cpp:432)
==7746==    by 0x4B38D5F: QWebNetworkInterface::QWebNetworkInterface(QObject*) 
(qwebnetworkinterface.cpp:906)
==7746==    by 0x4B38DE6: QWebNetworkInterface::defaultInterface() 
(qwebnetworkinterface.cpp:890)
==7746==    by 0x4B38E36: QWebNetworkManager::self() 
(qwebnetworkinterface.cpp:438)
==7746==    by 0x4AFAFD7: WebCore::ResourceHandle::start(WebCore::Frame*) 
(ResourceHandleQt.cpp:134)
==7746==    by 0x49E9280: 
WebCore::ResourceHandle::create(WebCore::ResourceRequest const&, 
WebCore::ResourceHandleClient*, WebCore::Frame*, bool, bool, bool) 
(ResourceHandle.cpp:53)
==7746==    by 0x4970831: 
WebCore::MainResourceLoader::loadNow(WebCore::ResourceRequest&) 
(MainResourceLoader.cpp:377)

QObject is allocating memory for this queued connection that is apparently 
never freed.

Cheers,

Adam


More information about the webkit-dev mailing list