Skip Menu |

This queue is for tickets about the JavaScript-V8 CPAN distribution.

Report information
The Basics
Id: 86906
Status: resolved
Priority: 0/
Queue: JavaScript-V8

People
Owner: Nobody in particular
Requestors: alankila [...] bel.fi
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.07
Fixed in: (no value)



Subject: $ctx->bind(foo => sub { ... }) leaks
It appears that bound function values are not released on Perl or JavaScript side when context is destroyed. On Perl side, if the sub closes over large amount of data, that data will remain referenced as well. Even a simple sub {} loses 4k of memory every hundred Context creations and destructions, or so. Test loop as follows: for (1 .. 10000) { my $v8 = JavaScript::V8::Context->new(); $v8->bind(foo => sub {}); print grep /VmRSS/, `cat /proc/$$/status`; }
Thanks, nice demo. Your contexts fix worked to sort this out!