ReferenceQueue.remove to allow GC of the queue itself
jaroslav.tulach at oracle.com
Mon Jul 28 07:23:55 UTC 2014
Thanks for your reply.
Dne Pá 25. července 2014 12:45:02, Brian Goetz napsal(a):
> So, let’s start with the problem, rather than the solution.
That is always better start.
> Could you start
> with writing up what issue you’re trying to address,
I believe I did that in the issue description. For easier accessibility I am copying the
NetBeans APIs offer an "active" reference queue which is automatically cleaned by
one dedicated NetBeans thread. Once we got a bug report that it behaves poorly
when used inside of a WAR file. Whenever the WAR was redeployed, the number of
cleanup threads increased by one, which also caused major memory leaks. We fixed
that with a bit of reflection (nasty, of course). The fix worked OK, up
until JDK-6853696 got fixed - the JDK-6853696 fix broke our assumptions, so now
NetBeans is significantly broken on JDK9. I can either come up with another reflective
trick or be constructive and improve JDK to offer the functionality we need. This
issue is my attempt to propose such JDK change.
I am ready to provide all necessary details. I am however afraid that doing that over
email may turn inefficient. Some iterative, question/answer, style may get us closer to
> and then we can
> proceed to evaluating whether the proposed solution is the right one?
> On Jul 24, 2014, at 7:29 AM, Jaroslav Tulach <jaroslav.tulach at oracle.com> wrote:
> > Hi.
> > I'd like to add one new method into java.lang.ref.ReferenceQueue. Can
> > anyone help me go through the review process? I've reported
> > https://bugs.openjdk.java.net/browse/JDK-8051843
> > but that probably is not enough, right?
> > Thanks in advance for your help.
> > -jt
More information about the core-libs-dev