You'll want to put it in a global, not a local.   Globals outlive their 
lexical scope.

Just as a note, they're move-only.

On Tuesday, November 28, 2017 at 12:20:00 AM UTC-8, [email protected] wrote:
>
> I have code like:
>
>
> v8::Isolate::Scope isolate_scope(isolate);
> v8::HandleScope handle_scope(isolate);
>
> v8::Local<v8::Context> context = v8::Context::New(isolate);
> v8::Context::Scope context_scope(isolate);
>
> {
>   std::vector<v8::Local<v8::Object> > ret = some_func();
>   some_another_func(ret);
> }
>
>
> Is this code valid if container lifetime < lifetime of handle_scope? Is 
> normal to store v8::Local in heap (like std containers do)?
>
>
>
>
>
>
>
>
>

-- 
-- 
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.

Reply via email to