ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: when are tasks instances no longer referenced?
Date Wed, 05 May 2004 15:51:58 GMT
At the moment all tasks/types instances are stored for
the execute phase of a project.

This can cause a memory problem.
A number of tasks  work around this
by having a finalize in the execute method to
remove objects that were created during the execute
method.

A good example of this is the Ant class.

(This needs to be done correctly, the xdoclet task
in xdoclet 1.2 nulls too many things - the destdir attribute).

As Jan has mentioned, one reason for this is to keep a reference
for the script task to use. Another reason is an unintended consequence
of the way the UnknownElement, RuntimeConfigurable objects were written.

Peter

Mariano Benitez wrote:

> I have no ID in the task.
>
> Jan.Materne@rzf.fin-nrw.de wrote:
>
>> A task can be executed multiple times - via Ants API.
>>
>> <echo id="theEcho">Hello</echo>
>> <script language="javascript"> <![CDATA[
>>    theEcho.perform();
>>    theEcho.perform();
>> ]]></script>
>>
>> If a task has an ID its reference is stored in the projects reference 
>> table (I donĀ“t know what happens if it has no ID).
>>
>> Jan
>>
>>
>>
>>  
>>
>>> -----Original Message-----
>>> From: Mariano Benitez [mailto:mariano@fuegolabs.com]
>>> Sent: Wednesday, May 05, 2004 5:03 PM
>>> To: Ant Developers List
>>> Subject: when are tasks instances no longer referenced?
>>>
>>>
>>> I want to know if a task instance created lifes for the complete 
>>> build or it is no longer referenced once it has been executed.
>>>
>>> The problem I have is that some tasks allocate a lot of memory, so I 
>>> need to know if I have to do something manually or I just leave the 
>>> gc to remove my instance.
>>>
>>> THX,
>>> MAriano
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: dev-help@ant.apache.org
>>>   
>>
>>
>>
>>  
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>


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


Mime
View raw message