Leak fest

  • QT starting from version 5 became a huge memory leak fest. What can I do to avoid these leaks?
    Note that I don't care that somebody thinks that one time leak isn't a leak. Every half-decent lib that makes that assumption provides a way to workaround that assumption.
    I need a way to clean up these one time leaks in order to make my profiling tools useful. Currently starting and closing my app produces more than 500 leaks from all kinds of static globals in QT. Effectively it makes these tools useless since I'm not going to check every time if there a couple of "real" leaks amont all these hundreds "non-leaks" from QT.
    Something like this:

    @f:\dd\vctools\crt\crtw32\misc\dbgmalloc.c (56): malloc
    C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\thread\qreadwritelock.cpp (121): QReadWriteLock::QReadWriteLock
    C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\kernel\qcoreglobaldata.cpp (51): QCoreGlobalData::QCoreGlobalData
    C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\kernel\qcoreglobaldata.cpp (47): anonymous namespace'::Q_QGS_globalInstance::innerFunction C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\global\qglobalstatic.h (128): QGlobalStatic<QCoreGlobalData,&anonymous namespace'::Q_QGS_globalInstance::innerFunction,A0xf5c9e6bb::Q_QGS_globalInstance::guard>::operator()
    C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\kernel\qcoreglobaldata.cpp (64): QCoreGlobalData::instance
    C:\Qt\Qt5.3.0\5.3\Src\qtbase\src\corelib\codecs\qtextcodec.cpp (680): QTextCodec::codecForLocale@

  • Moderators


    I recommend talking to the Qt engineers at the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest (you need to subscribe first)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.