JavaScript-V8
view release on metacpan or search on metacpan
t/zzmem_sub.t view on Meta::CPAN
#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use Test::More;
use FindBin;
my $context = require "$FindBin::Bin/mem.pl";
plan skip_all => "no ps" unless check_ps();
for (1..200000) {
$context->eval('(function(data) { var x = data; })')->(sub { 1 });
}
1 while !$context->idle_notification;
cmp_ok get_rss(), '<', 50_000, 'functions are released';
done_testing;
( run in 0.516 second using v1.01-cache-2.11-cpan-2c0d6866c4f )