I used Valgrind to detect if there are memory leaks in my program. Valgrind produces this output:
==2068== HEAP SUMMARY: ==2068== in use at exit: 22,872 bytes