groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject About caching Class instances and memory leak risk
Date Wed, 04 Apr 2018 03:39:36 GMT
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




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message