ReferenceQueue.remove to allow GC of the queue itself

David Holmes david.holmes at
Mon Jul 28 11:07:45 UTC 2014

On 28/07/2014 5:23 PM, Jaroslav Tulach wrote:
> 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
> text here:

I read the issue and still did not understand the nature of the problem. 
The netbeans bugs also did not shed any light on things for me. What is 
the functionality of the activeReferenceQueue and what it is that there 
are problems with?


> -----
> NetBeans APIs offer an "active" reference queue[1] which is automatically cleaned by
> one dedicated NetBeans thread. Once we got a bug report[2] 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[1] 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[3] or be constructive and improve JDK to offer the functionality we need. This
> issue is my attempt to propose such JDK change.
> [1][2]
> [2][3]
> [3][4]
> ---
> 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
> mutual understanding.
> -jt
>> 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> 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
>>> but that probably is not enough, right?
>>> Thanks in advance for your help.
>>> -jt
> --------
> [1]
> [2]
> [3]
> [4]

More information about the core-libs-dev mailing list