Status: New
Owner: ----
New issue 2986 by [email protected]: Memleak On V8
http://code.google.com/p/v8/issues/detail?id=2986
void Print(const FunctionCallbackInfo<v8::Value>& args)
{
String::AsciiValue Msg(args[0]);
char* szMsg = *Msg;
printf("%s\n", szMsg);
args.GetReturnValue().Set(args[0]);
}
void TestV8(Isolate* LocalIsoLate)
{
HandleScope handle_scope(LocalIsoLate);
LocalIsoLate->Enter();
Handle<ObjectTemplate> GlobalTemplate = v8::ObjectTemplate::New();
GlobalTemplate->Set(v8::String::New("Print"),
v8::FunctionTemplate::New(Print));
v8::Handle<v8::Context> Ctx = v8::Context::New(LocalIsoLate, 0,
GlobalTemplate);
Ctx->Enter();
v8::Handle<v8::Script> JsScript =
v8::Script::Compile(v8::String::New("Print(123);"), NULL);
JsScript->Run();
Ctx->Exit();
LocalIsoLate->Exit();
}
int main(int argc, char* argv[]) {
Isolate* LocalIsoLate = Isolate::GetCurrent();
TestV8(LocalIsoLate);
LocalIsoLate->Dispose();
V8::Dispose();
return 0;
}
SVN trunk Version:17449
Attachments:
memleak report.txt 0 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" 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/groups/opt_out.