>>>>> "gm" == glennm <[EMAIL PROTECTED]> writes:
gm> Also, the execute method now has a try/finally block to ensure gm> the subproject p1 is set to null so it can be GC'ed (thanks for gm> pointing that out Conor). This approach has a serious problem. It relies on the fact that a particular instance of a task will be executed once and only once - this might not be true. If you've given an id to the task, this one can be referenced via Project.getReferences() and nothing is stopping another task - be it a script task or one written in Java - to invoke execute on it again. What can we do about this? (1) Check whether there is a reference to this instance (or the surrounding target) and only null p1 if there isn't? (2) Put a disclaimer into the docs saying "Ant tasks may only be executed once"? (3) Don't drop the reference to p1? I'd prefer (1). Stefan
