I have been trying to make a 2D game Engine in Java using LWJGL and have been able to get pretty far into it before discovering an issue. While trying to debug the program I found that the more times I launch and restart the program the slower it gets. This usually happens after running my program 20-30 times or around 4-5 hours.
I tried restarting my IDE but it didn't work. I also tried to clean my project but it was still the same. The only thing I could do is to restart my computer and it runs like new.
What is the cause of this problem? Is it a garbage collection issue or is it something involving memory usage? Any help would be greatly appreciated.