summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-25 21:32:06 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-25 21:32:06 +0000
commit2d0f3c125e67b2dbdd3167e61d5a78ab19f9be48 (patch)
tree9c896f5ba1bf159c96055559ff15c664b295cc2f /sv.c
parent76b4e777616f9f9ab84de19fa2cc4a368604dcf1 (diff)
downloadperl-2d0f3c125e67b2dbdd3167e61d5a78ab19f9be48.tar.gz
tweak order of destruction so OBJECTs in GLOBs are visited after those
in RVs p4raw-id: //depot/perl@1216
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index cc3e37a723..1e5af0824b 100644
--- a/sv.c
+++ b/sv.c
@@ -355,8 +355,6 @@ do_clean_named_objs(SV *sv)
DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning named glob object:\n "), sv_dump(sv));)
SvREFCNT_dec(sv);
}
- else if (GvSV(sv))
- do_clean_objs(GvSV(sv));
}
}
#endif
@@ -365,10 +363,11 @@ void
sv_clean_objs(void)
{
in_clean_objs = TRUE;
+ visit(FUNC_NAME_TO_PTR(do_clean_objs));
#ifndef DISABLE_DESTRUCTOR_KLUDGE
+ /* some barnacles may yet remain, clinging to typeglobs */
visit(FUNC_NAME_TO_PTR(do_clean_named_objs));
#endif
- visit(FUNC_NAME_TO_PTR(do_clean_objs));
in_clean_objs = FALSE;
}