Groovy 4 GroovyClassLoader cache change: dynamic scripts still grow heap in long-running JVM
Groovy 4.0 documents that repeated dynamic compilation through fresh GroovyShell or GroovyClassLoader instances accumulates compiled classes in a static cache, which can leak memory in long-running JVM processes. The documented guidance is to reuse a single shared class loader or call GroovyClassLoader.clearCache() after use. My goal is to run a service that