I am making a game in Java. It works without lag as long as i keep playing it. If i die and restart the game, i starts lagging, if i die and restart the game again, it lags even more. lag gets worser each time you restart. I cannot provide the code. But i think the problem is that i am not properly disposing the objects after each restart. How can i dispose the objects in a JPanel?
Sorry for the limited info, help would be appreciated