On Thu, 24 Apr 2025 21:09:10 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> I'm not sure what you are proposing. But enqueue is used to ensure that >> inactive references are pruned from the data structure so that dumping only >> includes active references. This way, the JVM that loads these objects >> create these references as active and hence follow the usual life cycle that >> every other reference does. I want to avoid having a new "special" life >> cycles for dumped references. > > The map is still being used (and will be stored into the AOT cache). The key > no longer has a referent, so we need to remove the key from the map. Adding > the key to the stale queue and calling `removeStaleReferences()` will > accomplish this. `key.unused()` does not remove the key from the map.
Thanks. I am fine with the rest of the core library changes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24757#discussion_r2059237363