From: Doug MacEachern Date: Sun, 27 May 2001 13:47:13 +0000 (-0700) Subject: Re: perlio + multiple perl_alloc..destruct X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a6404c542f0e44e829f8d8091fc173931864343;p=p5sagit%2Fp5-mst-13.2.git Re: perlio + multiple perl_alloc..destruct Message-ID: p4raw-id: //depot/perl@10255 --- diff --git a/perlio.c b/perlio.c index 5a9ce2c..b64524a 100644 --- a/perlio.c +++ b/perlio.c @@ -311,6 +311,13 @@ HV *PerlIO_layer_hv; AV *PerlIO_layer_av; void +PerlIO_cleanup_layers(pTHXo_ void *data) +{ + PerlIO_layer_hv = Nullhv; + PerlIO_layer_av = Nullav; +} + +void PerlIO_cleanup() { dTHX; @@ -3596,6 +3603,8 @@ PerlIO_funcs PerlIO_mmap = { void PerlIO_init(void) { + dTHX; + call_atexit(PerlIO_cleanup_layers, NULL); if (!_perlio) { #ifndef WIN32