I have a bot that uses a lot of memory every battle. Every round, actually. If I run more than one battle in the same JVM, I get OutOfMemoryExceptions. BUT, if I set my big data structures to null at the end of the battle, no problems for many battles in a row.
You can download the bot "WeeksOnEnd" from the robocode repository.
You can see more discussion about this on the robowiki, under
http://robowiki.net/cgi-bin/robowiki?RoboRumble/ReportedProblems
http://robowiki.net/cgi-bin/robowiki?WeeksOnEnd
http://robowiki.net/cgi-bin/robowiki?RoboRumble/ParticipantsChat
-- Simonton
Logged In: YES
user_id=1249353
Originator: NO
See my comment at:
http://robowiki.net/cgi-bin/robowiki?WeeksOnEnd
Logged In: YES
user_id=1249353
Originator: NO
I have made a fix where all the static fields on a robot that are not final or primitive are set to null so that the garbage collector is called on these fields. I have made an alpha version that can be downloaded here:
http://robocode.sourceforge.net/files/robocode-setup-1.2.5-Alpha.jar
I should like you to tryout this version to see if the problem disappears?
Logged In: YES
user_id=1249353
Originator: NO
Fix is available with Robocode 1.2.5 Beta