let the program run a 1000 times or even more, by using a while loop. This way, if there is a memory leak, the memory will slowly fill up and your program will fail. Cause it will eventually ask for free memory (RAM) while all is used by your program. That way you know there is a memory leak.