[External] : Re: Virtual thread memory leak because TrackingRootContainer keeps threads

Andrew Haley aph-open at littlepinkcloud.com
Tue Jul 23 09:07:19 UTC 2024


On 7/22/24 23:24, robert engels wrote:
> But even if VT threads are not GC roots, a GC root must have a reference
>   to them, right?

Yes.

> (to the Loom team) Otherwise they would be immediately collected.

Which would be good, because if a virtual thread is not reachable from any
root, then it will never run (because no one can reach it.) So let's
immediately collect it.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the loom-dev mailing list