On 19.05.16 10:23, Alain Stalder wrote:
So maybe refactoring to always using WeakReference<Class> in all
objects stored in ClassInfo (meta classes, caches, ...) would be
sufficient to get "on-the-fly" garbage collection (i.e. before the
maximum on Metaspace or Heap is reached)? And would the additional
weakRef.get() calls maybe have again a noticeable effect on
performance? I won't try
this refactoring myself, but if someone else wants to try this?
Looking at the source for WeakReference resp. Reference, get() should be
as fast as possibly can, just returns a member field.
Alain