This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Free tied hash iterator state immediately at the `untie` call
authorNicholas Clark <nick@ccl4.org>
Tue, 24 Aug 2021 16:15:51 +0000 (16:15 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 22 Sep 2021 06:48:45 +0000 (06:48 +0000)
commit71e2181fdc1da7dfd599d69d45e604c493276c68
tree1969a24bc0dd3da50438a663003147171205e280
parent2536d892ffab416d2d30b44e4d64f0491177bf85
Free tied hash iterator state immediately at the `untie` call

Previously the state was only freed at the point when the hash was iterated
again, or re-tied, or destroyed.

This shouldn't make any difference to sane code, but the change can be
detected with suitably pathological pure-Perl code, so someone might just
(unwisely) be relying on this undocumented implementation detail.
pod/perldelta.pod
pp_sys.c
t/op/tie.t