develooper Front page | perl.perl5.porters | Postings from February 2013

PL_sv_objcount

Thread Next
From:
Steffen Mueller
Date:
February 27, 2013 17:04
Subject:
PL_sv_objcount
Message ID:
512E3C79.4070906@cpan.org
PL_sv_objcount is a counter of objects that is inspected in exactly one 
place:

   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;
   }

This is during global destruction.

In general, I'd be surprised if any significant Perl program didn't have 
some silly blessed ref flying around somewhere in the symbol table. So 
this block will be entered almost all the time anyway.

I'd be surprised if sv_clean_objs() was not robust to be called if 
there's no objects left. So removing PL_sv_objcount altogether would 
hardly be a loss: In some corner cases, a tiny bit more work in global 
destruction. Less THX->sv_objcount incrementing and decrementing at run 
time.

Opposition to killing this? Goes back all the way to the nineties! :)

--Steffen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About