Subject: | Leaks references in @thread_object_registry |
Tie::RefHash 1.38 contains the line
@thread_object_registry = grep { defined } @thread_object_registry;
As mentioned in Scalar::Util's docs, this idiom, while it does remove
dead weakrefs, also turns the remaining weakrefs into strong references.
You'd have to say something like:
@thread_object_registry = grep { defined } @thread_object_registry;
Scalar::Util::weaken($_) for @thread_object_registry;
Or use a method that doesn't involve copying, like looping over the
indices and splicing out dead refs.