stevan/p5-mop-redux — pull request #127 by wolfsage (2013-10-24 20:19:35+00:00)
Title: Clean up invocant from Newxz() when we're done with it

mhorsfall@Fireforge:~/p5-mop-redux$ valgrind --leak-check=full perl -Iblib/lib -Iblib/arch -Mop -e 'class X { method yyy { } }' 2>&1 | grep -i "are definitely" -A 6
==24915== 8 bytes in 1 blocks are definitely lost in loss record 37 of 1,278
==24915== at 0x402425F: calloc (vg_replace_malloc.c:467)
==24915== by 0x80CB33B: Perl_safesyscalloc (in /home/mhorsfall/perl5/perlbrew/perls/perl-5.17.6/bin/perl5.17.6)
==24915== by 0x4629EF3: THX_parse_signature (in /home/mhorsfall/p5-mop-redux/blib/arch/auto/mop/mop.so)
==24915== by 0x462A478: run_method (in /home/mhorsfall/p5-mop-redux/blib/arch/auto/mop/mop.so)
==24915== by 0x4620858: my_keyword_plugin (in /home/mhorsfall/.perlbrew/libs/perl-5.17.6@new/lib/perl5/i686-linux/auto/Devel/CallParser/CallParser.so)
==24915== by 0x8092022: Perl_yylex (in /home/mhorsfall/perl5/perlbrew/perls/perl-5.17.6/bin/perl5.17.6)

With the fix this doesn't happen (though I'm testing with perl-5.17.6..)