I'm developing a pool of V8 instance (isolate+context) and I'm figuring out
some memory problem.
I create a pair of isolate-context and I reuse it to run several script.
Unfortunately the memory allocated by the script is not deleted (disposed).
I simulate the behavior with a loop calling the script multiple times.
v8::Isolate* isolate = v8::Isolate::New();
{
v8::Isolate::Scope isolate_scope1(isolate);
for (int i=0; i<1000; i++) {
v8::HandleScope handle_scope1(isolate);
v8::Handle<v8::Context> context1 = v8::Context::New(isolate);
v8::Context::Scope context_scope1(context1);
v8::Handle<v8::String> source1 = ReadFile(isolate, script);
v8::Handle<v8::Script> script1 = v8::Script::Compile(source1);
v8::Handle<v8::Value> result1 = script1->Run();
v8::String::Utf8Value utf81(result1);
printf("%s\n", *utf81);
}
}
isolate->Dispose();
I used the following script:
var l = 1024 * 1024 * 2
var a = new Array(l);
for( var i = 0, len = a.length; i < len; ++i ) {
a[i] = function(){};
}
What am I missing ?
Thanks
Fabio
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.