I'm logging my heap size like this:
...and it seems that QDataStream is leaking memory when I do data serialization.Code:// Heap size logging TInt used = 0; User::Heap().AllocSize(used);
__UHEAP_MARK and __UHEAP_MARK_END also panics. Is there are bug in Qt or does it leave some handles open to be deleted later? How can I verify that my code does not leak memory in Qt?Code:// Externalize class to data const QByteArray& MyClass::externalize() const { // iData QByteArray* has been initialized in constructor and deleted in destructor. QDataStream out(iData, QIODevice::Append); out << testString1; out << testString2; out << testBool; return *iData; } // Internalize data to class int MyClass::internalize(const QByteArray& aData) { QDataStream in(aData); if(in.atEnd()) { return 0; } else { in >> *testString1; in >> *testString2; in >> *testBool; return in.device()->pos() ; } }
I'm using Qt version 4.6.3.



