From e563725d1b274806aa89b7e36fd8f73985254e25 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 20 Oct 2006 22:35:44 +0000 Subject: [PATCH] Free the realThing with UE is finished with it (fixes since last look at this allows this) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@466283 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/UnknownElement.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/UnknownElement.java b/src/main/org/apache/tools/ant/UnknownElement.java index 3eabf17ac..845132e0c 100644 --- a/src/main/org/apache/tools/ant/UnknownElement.java +++ b/src/main/org/apache/tools/ant/UnknownElement.java @@ -281,13 +281,11 @@ public class UnknownElement extends Task { ((Task) realThing).execute(); } - // the task will not be reused ( a new init() will be called ) - // Let GC do its job + // Finished executing the task, null it to allow + // GC do its job + // If this UE is used again, a new "realthing" will be made realThing = null; - // FIXME: the following should be done as well, but is - // commented out for the moment as the unit tests fail - // if it is done - //getWrapper().setProxy(null); + getWrapper().setProxy(null); }