summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2013-02-28 18:23:32 +0100
committerSteffen Mueller <smueller@cpan.org>2013-03-06 18:48:58 +0100
commitddf23d4a1ae98daa8608179f83aad311d03898ef (patch)
treed179e7c93aae15671f6265dbba2d083c031223a8 /perl.c
parentf615be485d8c90f01432a39e678e01c615e2c15e (diff)
downloadperl-ddf23d4a1ae98daa8608179f83aad311d03898ef.tar.gz
Prepare PL_sv_objcount removal
This used to keep track of all objects. At least by now, that is for no particularly good reason. Just because it could avoid a bit of work during global destruction if no objects remained. Let's do less work at run-time instead. The interpreter global will remain for one deprecation cycle.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/perl.c b/perl.c
index a27962d5c6..e9549d5735 100644
--- a/perl.c
+++ b/perl.c
@@ -758,15 +758,12 @@ perl_destruct(pTHXx)
PerlIO_destruct(aTHX);
- if (PL_sv_objcount) {
- /*
- * Try to destruct global references. We do this first so that the
- * destructors and destructees still exist. Some sv's might remain.
- * Non-referenced objects are on their own.
- */
- sv_clean_objs();
- PL_sv_objcount = 0;
- }
+ /*
+ * Try to destruct global references. We do this first so that the
+ * destructors and destructees still exist. Some sv's might remain.
+ * Non-referenced objects are on their own.
+ */
+ sv_clean_objs();
/* unhook hooks which will soon be, or use, destroyed data */
SvREFCNT_dec(PL_warnhook);