Browse Source

place the cleanup code in a finally clause

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@568876 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
7ec7ef9d62
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      src/main/org/apache/tools/ant/UnknownElement.java

+ 10
- 10
src/main/org/apache/tools/ant/UnknownElement.java View File

@@ -283,17 +283,17 @@ public class UnknownElement extends Task {
throw new BuildException("Could not create task of type: "
+ elementName, getLocation());
}

if (realThing instanceof Task) {
((Task) realThing).execute();
try {
if (realThing instanceof Task) {
((Task) realThing).execute();
}
} finally {
// 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;
getWrapper().setProxy(null);
}

// 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;
getWrapper().setProxy(null);

}

/**


Loading…
Cancel
Save