This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make hv freeing iterative rather than recursive
[perl5.git] / hv.c
diff --git a/hv.c b/hv.c
index 0d296a4..3bd3e6e 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1753,6 +1753,8 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
        allocate an array for storing the effective name. We can skip that
        during global destruction, as it does not matter where the CVs point
        if they will be freed anyway. */
+    /* note that the code following prior to hfreeentries is duplicated
+     * in sv_clear(), and changes here should be done there too */
     if (PL_phase != PERL_PHASE_DESTRUCT && (name = HvNAME(hv))) {
         if (PL_stashcache)
            (void)hv_delete(PL_stashcache, name, HvNAMELEN_get(hv), G_DISCARD);