I suspect this has nothing to do with memory, but an infinite loop that you've introduced somewhere. Without seeing more of the actual game, there's no way to provide any specific information, but you'll find debug messages to be essential in diagnosing the problem. I'd start with putting debug messages at the start of key events that might cause the issue (step, collision, draw, and anything that could be triggered by the action that leads to the freeze). Whatever is the last message you see is probably the event where the loop is happening. You can put another debug message at the end to check. (i.e. if you don't see that, then you know it's not reaching the end of the event.) Then you can narrow in on what's causing the loop, or at least show the relevant part of your game here.