Github user jochenberger commented on a diff in the pull request: https://github.com/apache/groovy/pull/445#discussion_r82572329 --- Diff: src/main/groovy/lang/GroovyClassLoader.java --- @@ -969,13 +970,24 @@ public Void run() { */ public void clearCache() { synchronized (classCache) { + for (Class cl : classCache.values()) { + InvokerHelper.removeClass(cl); + } classCache.clear(); } synchronized (sourceCache) { sourceCache.clear(); } } + @Override + public void close() throws IOException { + super.close(); + for (Class cl : classCache.values()) { --- End diff -- We could also just call `clearCache()` from here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---