AFAICS all AntClassLoader instances created by Ant are associated with
a project instance and will eventually get cleaned up when the current
project finishes.

In some cases we really need to keep the class loaders around - the
loaders that have loaded tasks for example.  In other cases the
loaders are transient and we could invoke cleanup immediately like in
ANTLR.java:

    protected boolean is272() {
        try {
            AntClassLoader l = new AntClassLoader(getProject(),
                                                  commandline.getClasspath());
            l.loadClass("antlr.Version");
            return true;
        } catch (ClassNotFoundException e) {
            return false;
        } // end of try-catch
    }

I'd like to review the cases with transient classloaders.  Should I do
this for 1.6.2 or should I work on CVS HEAD only?

I may produce false positives and break something if I cleanup
classloader too early - Gump won't catch this since everything in Gump
uses the one classloader to rule them all.  Therefore I tend to say
CVS HEAD, and maybe merge some obvious cases like the one above into
the 1.6 branch.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to