ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8689] New: - AntClassLoader still leaks memory.
Date Wed, 01 May 2002 04:25:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8689>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8689

AntClassLoader still leaks memory.

           Summary: AntClassLoader still leaks memory.
           Product: Ant
           Version: 1.5 alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: burner@core.binghamton.edu


I believe I have come accross a memory leak (and a patch that resolves it). I
have been using ant with Castor JDO and JUnit and running ant like "ant clean
test test test test test ... ". I narrowed down the leak and was able to notice
it using a simple java (that doesn't fork) task and running ant like 

"ant clean `export i=1000; until [ "$i" -eq "0" ]; do echo run; i=$((i-1)); done`"

Anyway, I have patch that resolves the case for the java task, it patches
against 1.4.1 and cvs HEAD:

Index: src/main/org/apache/tools/ant/AntClassLoader.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/AntClassLoader.java,v
retrieving revision 1.52
diff -u -r1.52 AntClassLoader.java
--- src/main/org/apache/tools/ant/AntClassLoader.java   24 Apr 2002 06:16:46
-0000      1.52
+++ src/main/org/apache/tools/ant/AntClassLoader.java   1 May 2002 04:24:26 -0000
@@ -1104,6 +1104,7 @@
      * files are closed.
      */
     public void cleanup() {
+        project.removeBuildListener(this);
         pathComponents = null;
         project = null;
         for (Enumeration e = zipFiles.elements(); e.hasMoreElements();) {

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


Mime
View raw message