Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.8.1
-
None
-
linux
Description
memory leak is detected at valgrind when the the following code is run.
int main(int argc, char** argv) { QApplication a(argc,argv); QTimer t; a.connect(&t, SIGNAL(timeout()), &a, SLOT(quit())); t.start(1000); return a.exec(); }
valgrind log is attached. The memory leak is the one indicated below.
==1716== 242 (96 direct, 146 indirect) bytes in 1 blocks are definitely lost in loss record 103 of 138 ==1716== at 0x4A07F7B: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==1716== by 0x67000EE: QLibraryPrivate::findOrCreate(QString const&, QString const&) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtCore.so.4) ==1716== by 0x6700564: QLibrary::setFileNameAndVersion(QString const&, int) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtCore.so.4) ==1716== by 0x670061B: QLibrary::QLibrary(QString const&, int, QObject*) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtCore.so.4) ==1716== by 0x543E59E: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtGui.so.4) ==1716== by 0x53D05D1: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtGui.so.4) ==1716== by 0x53D0EB3: QApplication::QApplication(int&, char**, int) (in /home/ssc/devel/ICOSOFT/EXTLIBS/Qt4/4.8.1/linux/gcc44/lib/libQtGui.so.4) ==1716== by 0x4009E1: main (main.cpp:9) ==1716== ==1716== LEAK SUMMARY: ==1716== definitely lost: 480 bytes in 5 blocks ==1716== indirectly lost: 622 bytes in 13 blocks ==1716== possibly lost: 0 bytes in 0 blocks ==1716== still reachable: 76,607 bytes in 911 blocks ==1716== suppressed: 960 bytes in 4 blocks ==1716== Reachable blocks (those to which a pointer was found) are not shown. ==1716== To see them, rerun with: --leak-check=full --show-reachable=yes ==1716== ==1716== For counts of detected and suppressed errors, rerun with: -v ==1716== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 9 from 9)