groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain Stalder <astal...@span.ch>
Subject Re: Improve Groovy class loading performance and memory management
Date Tue, 17 May 2016 14:14:40 GMT
On 17.05.16 09:48, Alain Stalder wrote:
> Experimentally, for the test with ClassGCTester, the first call 
> (metaRegistry.removeMetaClass(clazz)) was not necessary to have 
> garbage collection before Metaspace reaches the maximum, the other two 
> were.
Makes sense:
metaRegistry keeps no reference to the class, instead it gets ClassInfo 
and stores the MetaClass there.
Introspector has a reference to the class: It contains a WeakHashMap 
(resp. a class derived of it) with the class as the key and an array of 
java.lang.reflect.Method as the value, which, in turn, has the class 
reference in a private field.

Alain

Mime
View raw message