Am 04.04.2018 um 05:39 schrieb Daniel Sun:
Hi all,

      I find Groovy caches Class instances with strong reference[1][2], which
will prevent Class instances unloading and may cause memory leak.

      Should we replace strong reference with soft reference? Any thoughts?

Cheers,
Daniel.Sun

[1]
https://github.com/apache/groovy/blob/master/src/main/groovy/groovy/lang/GroovyClassLoader.java#L93
[2]
https://github.com/apache/groovy/blob/master/src/main/groovy/groovy/lang/GroovyClassLoader.java#L99


every ClassLoader has a strong reference to the classes that ClassLoader defines. What we have to be careful of is not to keep references to other classes. Do you think this is violated?

bye Jochen

Reply via email to