Hi all, I have some doubts regarding the memory management in Qt, specially about containers and how the COW affects the release of memory.
I'm doing some research in GitQlient and I've noticed that the RAM memory used doesn't decrease at all when it's supposed to. In there I'm managing an internal cache (needs some improves, I know) that stores the commit information in a QHash<QString, CommitInfo> <https://github.com/francescmm/GitQlient/blob/master/src/cache/GitCache.h> (ignore the QVector<CommitInfo*> since it just stores the references to the QHash[sha] for optimization). I fill the hash on load and clear it when I close the repo (already ensure about it with logs and debugging). And the confusing thing is that the memory doesn't decrease at all. So, if I keep opening and closing the same repo, the memory used keeps increasing. Do you know if there is any internal mechanism that causes that? Or is just the way the OS acts about memory management? I can setup a branch with the changes so barely no widgets are created to facilitate the use case, if needed.
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
