Restarting your program is actually part of your logic, i.e.:
WHILE MAINLOOP=1
`
LOAD IMAGE
`
WHILE GAMELOOP=1
`
GAME LOGIC
`
ENDWHILE
`
DELETE IMAGE
`
ENDWHILE
As you can see, as your program ends the game loop and then loops around the master/main loop, your resources are managed in the outer loop. It's always a good idea to ensure your variables are reset at the right point in your nested loops, and that you delete any resources once you have finished with them, to keep your code clean and symmetrical. It's takes a little extra time, but you'll be thankful a few days/weeks down the road when you are trying to find memory hogging code and going back to reset variables you forgot about early on.