Trying to create a game, however I've run into the heap space issue because of too many actors. What I noticed when I reduced the amount of actors and ran it multiple times is that it's memory usage in taskmgr increases by the amount needed to run the program once every time you reset/run. In other words: Greenfoot will start at around 150-200MB usage, you run once, it adds 70MB. you reset, it adds 70 mb etc... So it never actually "resets", it merely starts the execution of your program on top of the one already running, but only displaying the newest one. This can't be intended, right? It's not intuitive or user friendly in any case. Might I suggest: Terminate execution and reclaim memory when a user clicks on reset or runs the code via the main class. Perhaps I overlooked something though.