Subject: | Leaks references in STORE |
Tie::RefHash::Weak 0.09 contains the line
@$objects = grep { defined } @$objects;
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:
@$objects = grep { defined } @$objects;
Scalar::Util::weaken($_) for @$objects;
Or use a method that doesn't involve copying, like looping over the
indices and splicing out dead refs, and possibly searching for $s at the
same time.