I'm logging my heap size like this:
...and it seems that QDataStream is leaking memory when I do data serialization.
// Heap size logging
TInt used = 0;
__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?
// 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;
// Internalize data to class
int MyClass::internalize(const QByteArray& aData)
in >> *testString1;
in >> *testString2;
in >> *testBool;
return in.device()->pos() ;
I'm using Qt version 4.6.3.