You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dave Bartmess <Da...@healthlanguage.com> on 2005/04/05 18:07:04 UTC

Garbage collection question

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 (through ant still, but "written out"
instead of a single call to do all), it seems to work...

Thanks
-- 
Dave Bartmess
Sr. Software Configuration Manager
Health Language. Inc.

Office: 303-307-4400 x274
Cell:   303-883-9117

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Garbage collection question

Posted by "Robert r. Sanders" <ro...@ipov.net>.
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 Ant-Call (and its variants) might cause the task objects to be 
derefernced for every loop, meaning a little more CPU time, but 
hopefully no oyt-of-memory errors.  You might also look at either the 
ANT scriping task, or the Ant-contrib (from sourceforge) for-each tag.

Dave Bartmess wrote:

>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 (through ant still, but "written out"
>instead of a single call to do all), it seems to work...
>
>Thanks
>  
>

-- 
    Robert r. Sanders
    Chief Technologist
    iPOV
    (334) 821-5412
    www.ipov.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org