From aac9d523d6a5c05209364195355a241de1641c93 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sun, 19 Sep 2010 12:49:07 +0100 Subject: [perl #40388] perl_destruct() leaks PL_main_cv Well yes, it does, kinda; but it's harmless. Add a comment to that effect. --- perl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perl.c') diff --git a/perl.c b/perl.c index 860cdfcd2a..79e87a5b64 100644 --- a/perl.c +++ b/perl.c @@ -751,6 +751,10 @@ perl_destruct(pTHXx) PL_main_root = NULL; } PL_main_start = NULL; + /* note that PL_main_cv isn't usually actually freed at this point, + * due to the CvOUTSIDE refs from subs compiled within it. It will + * get freed once all the subs are freed in sv_clean_all(), for + * destruct_level > 0 */ SvREFCNT_dec(PL_main_cv); PL_main_cv = NULL; PL_dirty = TRUE; -- cgit v1.2.1