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=17216>. 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=17216 ProcessDestroyer memory leak Summary: ProcessDestroyer memory leak Product: Ant Version: 1.5.1 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] org.apache.tools.ant.taskdefs.ProcessDestroyer is the source of a memory leak. Whenever an instance of ProcessDestroyer is created, it adds a shutdown hook. Normally, their is only one instance, the static member of org.apache.tools.ant.taskdefs.Execute, but if there are situations when the Execute class is loaded more than once, e.g. IDE integration then multiple instances of Execute can be created. Eclipse ant integration invokes a new classloader every time it runs an Ant project. Since the new ProcessDestroyer adds a shutdown hook, the entire classloader cannot be GCed until the VM exits. I think ProcessDestroyer should only add the shutdown hook if necessary and remove the shutdown hook if it is no longer needed. I think this is a nice fix for ProcessDestroyer which does not alter its function except for some unnecessary method calls.
