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.

[EMAIL PROTECTED] 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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to