I have made some more tests.

basically i am retrieving data from a database. For each row an object gets allocated which saves all the attributes as members.

The Class returns QString for example and that QString gets added in the above-mentioned hash.


The following consumes way more memory:

QString temp = pTBReleaseEntry->getFileHash();


releaseIdToString.insert(pTBReleaseEntry->getReleaseId(), temp);



The following consumes way less memory:


QString temp(pTBReleaseEntry->getFileHash().toLatin1().data());

releaseIdToString.insert(pTBReleaseEntry->getReleaseId(), temp);


I suppose this is some QT issue, which i do not really understand. ;-)