ReferenceQueue declared but not used in ThreadContainers (memory leak)?

Alexey Gavrilov Alexey1.Gavrilov at gmail.com
Tue May 16 20:15:34 UTC 2023


Thanks Alan for the prompt response!
Please share the bug id when you created it. Hopefully it will be fixed
soon.

Am I correct, this is basically a memory leak? That is, those weak
references will never be garbage collected, so the application can
eventually crash.

Regards,
Alexey


On Tue, May 16, 2023 at 7:53 PM Alan Bateman <Alan.Bateman at oracle.com>
wrote:

>
> On 16/05/2023 20:38, Alexey Gavrilov wrote:
> > :
> >
> > I guess the idea was that `QUEUE` should have been passed as a second
> > parameter to the `WeakReference` constructor in the
> > `registerContainer` method, so the reference queue would properly
> > register every new `ThreadContainer` instance.
>
> Good sleuthing, I suspect this got lost somehow before the integration
> for JDK 19. I haven't seen any other reports but if there are many pool
> being created over time then it will be an issue. We'll get a bug
> created for this and sort it out. Thank you!
>
> -Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230516/d471fa8c/attachment.htm>


More information about the loom-dev mailing list