Every XS authors should use Test::Valgrind
Test::Valgrind is a perl wrapper for valgrind(1). T::V helps to find invalid memory operation.
You can use it by command line like following:
prove --exec 'perl -Iblib/lib -Iblib/arch -MTest::Valgrind' t/*.t
Or use it as test script. You can put it on xt/.
use Test::More;
use Test::Requires 'Test::Valgrind';
leaky();
Latest stable version of valgrind is not supported OSX 10.6, yet. But, you can install valgrind from repository HEAD.
Published: 2010-09-15(Wed) 07:50