I have a multithreaded application. I don't use iterational dynamic memory allocation (new/delete). Already I overloaded global new/delete and knew, that there are no memory leaks in cause of them. This app is eating memeory well and when it crashes (I reimplemented QApplication and notify() into it to catch exceptions) I got badalloc from QAbstractSocket. How to understand and correct memory leak. (Is there a notify overflow and why memory not released?) Where is the reason of this hell? Thank you for any help. I don't know what to do.
Here is last data from debugger:
Qt Code:
Local variables e std::bad_alloc & [std::exception] std::exception [vptr] 0x1885b48 [0] 0x17b3770 <std::bad_alloc::~bad_alloc()> [1] 0x17b3748 <std::bad_alloc::~bad_alloc()> [2] 0x17b3688 <std::bad_alloc::what() const> event @0x1928dea8 QEvent [vptr] 0x18854c8 d 0x0 QEventPrivate * m_accept 1 ushort posted 0 ushort reserved 0 ushort spont 0 ushort t 50 ushort receiver QReadNotifier snenabled true bool sockfd 1404 int engine @0x193a21d0 QNativeSocketEngine [QAbstractSocketEngine] QAbstractSocketEngine [vptr] 0x680fbc88 d_ptr @0x193a21d4 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>> [QAbstractSocketEnginePrivate] QAbstractSocketEnginePrivate [QObjectPrivate] QObjectPrivate [QObjectData] QObjectData connectedSignals @0x1bfc6344 quint32 [2] [0] 0 quint32 [1] 0 quint32 connectionLists 0x0 QObjectConnectionListVector * currentChildBeingDeleted 0x0 QObject * currentSender 0x0 QObjectPrivate::Sender * declarativeData 0x0 QAbstractDeclarativeData * eventFilters <0 Ñлементов> QList<QPointer<QObject>> extraData @0x1c60f8a0 QObjectPrivate::ExtraData propertyNames <0 Ñлементов> QList<QByteArray> propertyValues <0 Ñлементов> QList<QVariant> userData <0 Ñлементов> QVector<QObjectUserData*> objectName "" QString pendingChildInsertedEvents <0 Ñлементов> QVector<QWeakPointer<QObject>> senders 0x0 QObjectPrivate::Connection * sharedRefcount QAtomicPointer<QtSharedPointer::ExternalRefCountData> threadData @0x1858f3f8 QThreadData hasSetSocketError false bool localAddress 127.0.0.1 QHostAddress localPort 28911 quint16 peerAddress 127.0.0.1 QHostAddress peerPort 56626 quint16 receiver QTcpSocketPrivate socketErrorString "Unknown error" QString exceptNotifier 0x0 QSocketNotifier * readNotifier QReadNotifier socketDescriptor 1404 int winSock QWindowsSockInit writeNotifier QWriteNotifier engine @0x193a21d0 QNativeSocketEngine str "Error std::bad_alloc sending event 6QEvent to object (13QReadNotifier) this "QDevicesRunTester" @0x22fe0c QDevicesRunTestApplicationTo copy to clipboard, switch view to plain text mode
Bookmarks