Ich suchte herum, aber es scheint keine Antworten für mich, also entschied ich mich hier zu fragen. Also habe ich valgrind verwendet, um mein Programm zu überprüfen, hier ist das ErgebnisC++ Valgrind Mehr Alloks als frei mit keine Lecks
==24810== HEAP SUMMARY:
==24810== in use at exit: 1,478 bytes in 30 blocks
==24810== total heap usage: 50 allocs, 20 frees, 43078 bytes allocated
==24810==
==24810== LEAK SUMMARY:
==24810== definitely lost: 0 bytes in 0 blocks
==24810== indirectly lost: 0 bytes in 0 blocks
==24810== possibly lost: 0 bytes in 0 blocks
==24810== still reachable: 1,478 bytes in 30 blocks
==24810== suppressed: 0 bytes in 0 blocks
Ist das ein Leck? Wenn ja, was könnte der Grund sein?
Wurde Ihr quesiton beantworten? –