We experienced that the memory fills when running the model in batch mode. It has been verified that the Workers does not get cleaned up properly from the memory between the runs.
The Workers are created as ProActive ActiveObjects at startup of each simulation. The ProActive keeps references to these objects, and causes no problem when the simulation is started in GUI mode, because after the simulation run the JVM is terminated.
A proposed solution may be to call the PAActiveObject.terminate(Object, boolean) function at the atEnd() method for all of the Workers.
Original bugreport [HUN]
the atEnd() method in StatNetMaster has been overridden: I added a PAActiveObject.terminateActiveObject(Object, boolean) call for each worker in it (as it was suggested).