From: Vincent Pit Date: Mon, 5 Sep 2011 17:58:10 +0000 (+0200) Subject: Stop leaking the SVs stored in the hints structure. X-Git-Tag: v0.26~12 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=838f008dcda56897a619afdd99f450fb62672a15 Stop leaking the SVs stored in the hints structure. After being clone, they only need one refcount push, which is done at the end of indirect_clone(). --- diff --git a/indirect.xs b/indirect.xs index dbcaad1..beec19f 100644 --- a/indirect.xs +++ b/indirect.xs @@ -253,7 +253,6 @@ STATIC void indirect_ptable_clone(pTHX_ ptable_ent *ent, void *ud_) { h2 = PerlMemShared_malloc(sizeof *h2); h2->code = indirect_clone(h1->code, ud->owner); - SvREFCNT_inc(h2->code); #if I_WORKAROUND_REQUIRE_PROPAGATION h2->require_tag = PTR2IV(indirect_clone(INT2PTR(SV *, h1->require_tag), ud->owner)); @@ -262,7 +261,6 @@ STATIC void indirect_ptable_clone(pTHX_ ptable_ent *ent, void *ud_) { #else /* I_HINT_STRUCT */ h2 = indirect_clone(h1, ud->owner); - SvREFCNT_inc(h2); #endif /* !I_HINT_STRUCT */