So I'm testing out my game, it's no where near a complicated or sophisticated game, but every time I leave it running for a little bit it slows my pc until it starts freezing. It seems to only happen when I'm trying to stop the game after the timer goes out, all the objects except the backgrounds get destroyed and text comes up saying time's up!
It only happens when I add the condition for when timer = 0 then it destroys all the objects individually then spawns the Time's up! text in the center of the screen.
But if i take the condition away the game is fine if I leave it running, but adding that and process in the task manager goes up to like 1,000,000K in the memory, so does anyone know what is causing this issue?