Garbage collection is non-deterministic - the JVM gets to decide when to
run it. My guess would be that ANT has a reference to ALL the files and
doesn't let go of any of them until all the tasks have run. You can
probably get around this with a little re-coding; I could be wrong, but
I think
Does the garbage collection have a "time-out" it's based on, or is it
strictly the lack of references to the classes?
I'm seeing problems with memory errors when doing a series of tasks on a
set of files, and running out of memory. But if I run the tasks on the
files one at a time manually (throug