I tried to port a game over from Greenfoot to a game engine called GoldenTGameEngine. It uses Sprites as it's main objects. However, Sprite did not have all the functionality that Actor has in Greenfoot. So I made my own Actor class. For some reason, if the game is played for more than about twenty minutes, the game stops, complaining that it had run out of Heap Space. Different things trigger it(i.e. render(), removeObject(), addObject(), setImage("")), so I don't think that it's my Actor class that's the problem.
Does the Heap Space normally act like this? Could it be too many cached images? How do I increase the Heap Space to a Java program?