Source

Perl-XS-Guide / perl5 / ext-embed-internals / docbook / examples / 0008-assign-to-array / XSTest / t / lib / scripts / get-string-leak-test.pl

Full commit
#!/usr/bin/perl

use strict;
use warnings;

use blib;

use XSTest;

my $count;
while (1)
{
    if (++$count % 1000 == 0)
    {
        print "$count\n";
    }
    my $s = XSTest::get_xs_string();
    $s .= "Hello";
}