Groovy update causing a ton of dead GroovyClassLoaders in PermGen
问题 I have a Java 7 project that runs scripts every n minutes by n processes. Here is an example of the code that runs the scripts. ScheduledFuture scheduledFuture = scheduledService.scheduleAtFixedRate(new Runnable() { @Override public void run() { try (GroovyClassLoader cl = new GroovyClassLoader()) { // Load up reusable script modules in the class loader Class scriptClass = cl.parseClass(scriptSource); Foo script = optimizationClass.newInstance(); // Tell Groovy that we don't need class meta