develooper Front page | perl.perl5.porters | Postings from December 2012

? dangerous paradigm in perl.c global destruction ?

Thread Next
Karl Williamson
December 23, 2012 21:51
? dangerous paradigm in perl.c global destruction ?
Message ID:
I was thinking about this paradigm that is in perl.c perl_destruct()

     PL_utf8_toupper = NULL;

If for some reason that SV does not have a ref count of 1 (or less), 
then it will be inappropriately set to NULL.

It seems to me that it would be safer to free it unconditionally than to 
decrement the ref count.

Is there a problem with doing that?  If no problem, which free function 
should be used?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About