Memory leak in QML example project
-
Hi,
I have craeted simple one page qml project with all static components still valgrind shows memory leaks in QML and other qt libraries.
So, i tried to run the valgrind in given QML example projects and there also i found memory leak issue.
I ran qmlaxes example code and here are the valgrind run summary:
==32578== HEAP SUMMARY: ==32578== in use at exit: 7,588,523 bytes in 54,405 blocks ==32578== total heap usage: 477,543 allocs, 423,138 frees, 69,152,459 bytes allocated ==32578== LEAK SUMMARY: ==32578== definitely lost: 376 bytes in 16 blocks ==32578== indirectly lost: 32 bytes in 1 blocks ==32578== possibly lost: 196,416 bytes in 1,545 blocks ==32578== still reachable: 7,309,067 bytes in 52,169 blocks ==32578== of which reachable via heuristic: ==32578== length64 : 4,960 bytes in 82 blocks ==32578== newarray : 107,688 bytes in 92 blocks ==32578== suppressed: 0 bytes in 0 blocks ==32578== ==32578== For lists of detected and suppressed errors, rerun with: -s ==32578== ERROR SUMMARY: 1074 errors from 1069 contexts (suppressed: 0 from 0)
I am using QT5.12.12
-
@vicky_mac Where and what is leaking?
In any case, Qt 5.12 is long past its support period. It will not be fixed for sure.
-
@sierdzio I getting definitely lost leaks in
libfontconfig.so.1.12.0
libQt5Quick.so.5.12.12
libQt5Qml.5.12.12Stack trace start from:
malloc (vg_replace_malloc.c:431)
calloc (vg_replace_malloc.c:1554)
operator new(unsigned long) (vg_replace_malloc.c:472)
respectively and ends at libs -
-
@vicky_mac said in Memory leak in QML example project:
Is there anyway we can prevent that?
No, as already replied in your other thread asking exactly the same, which you have not referenced from this topic. But you can keep asking the same.Or, you can look through the source code, find the exact point of the leak you claim, and fix it.Apologies, that was https://forum.qt.io/topic/152049/stackview-is-cause-of-memory-leak, you do not seem to be the same author, though they look similar.
I also notice you are using Qt 5.12. Qt Company is not going to be addressing anything in that version.