1

I am running valgrind on my Qt code, and even on successful exit of the application, I get the following report from valgrind:

8,832 bytes in 92 blocks are still reachable in loss record 12 of 12<br>      
at 0x4025390: operator new(unsigned int) (vg_replace_malloc.c:214)<br>
==3339==    by 0x4B75F05: QMutex::QMutex(QMutex::RecursionMode) (qmutex.cpp:123)
==3339==    by 0x4B77602: QMutexPool::get(void const*) (qmutexpool.cpp:137)<br>
==3339==    by 0x4CA0EC2: signalSlotLock(QObject const*) (qobject.cpp:112)<br>
==3339==    by 0x4CA3939: QMetaObjectPrivate::connect(QObject const*, int, QObject const*, int, int, int*) (qobject.cpp:2900)<br>
==3339==    by 0x4CA5C00: QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) (qobject.cpp:2599)

I disconnect all signal connections and also delete the objects. The above mentioned leak increases if I increase the amount of signal and slot connections.

Can anybody help with this?

Rohan Singh
  • 20,497
  • 1
  • 41
  • 48
Ajay
  • 9,947
  • 8
  • 32
  • 34
  • 1
    Does it increase if you increase number of signals and slots, or does it increase if you increase number of connections between signals and slots, i.e. number of QObject::connect calls? – chalup Mar 16 '10 at 07:54
  • Memory that is "still reachable" isn't actually leaked memory. How many errors are listed in your "ERROR SUMMARY"? Also, see http://stackoverflow.com/questions/1593717/is-anyone-using-valgrind-and-qt. – Parker Coates Mar 17 '10 at 03:59

0 Answers0