So I don't think we ever closed the loop here. Did anyone on the JDK side
confirm this, file an issue, or fix it?

We still have ClassValue disabled in JRuby because of the rooting issues
described here and in https://github.com/jruby/jruby/pull/3228.

- Charlie

On Thu, Aug 27, 2015 at 7:04 AM Jochen Theodorou <blackd...@gmx.org> wrote:

> One more thing...
>
> Remi, I tried your link with my simplified scenario and it does there
> not stop the collection of the classloader
>
> Am 27.08.2015 11:54, schrieb Jochen Theodorou:
> > Hi,
> >
> > In trying to reproduce the problem outside of Groovy I stumbled over a
> > case case which I think should work
> >
> > public class MyClassValue extends ClassValue {
> >      protected Object computeValue(Class type) {
> >          Dummy ret = new Dummy();
> >          Dummy.l.add (this);
> >          return ret;
> >      }
> > }
> >
> >   class Dummy {
> >       static final ArrayList l = new ArrayList();
> >   }
> >
> > basically this means there will be a hard reference on the ClassValue
> > somewhere. It can be in a static or non-static field, direct or
> > indirect. But this won't collect. If I put for example a WeakReference
> > in between it works again.
> >
> > Finally I also tested to put the hard reference in a third class
> > instead, to avoid this self reference. But it can still not collect.
> >
> > So I currently have the impression that if anything holds a hard
> > reference on the class value that the classloader cannot be collected
> > anymore.
> >
> > Unless I misunderstand something here I see that as a bug
> >
> > bye blackdrag
> >
>
>
> --
> Jochen "blackdrag" Theodorou
> blog: http://blackdragsview.blogspot.com/
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev@openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
-- 

- Charlie (mobile)
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to