Hi Feng,

thanks for your response. I create the context in a separate method using
this code:

v8::Handle<v8::Context> context = v8::Context::New(NULL, globaltemplate);
context->Enter();

Is this okay? I presume that the destruction code will then look like this:

v8::Persistent<v8::Context> c = v8::Context::GetCurrent();
c.Dispose();
c.Clear();



O.



2009/6/12 Feng Qian <[email protected]>

>
> Assuming you have a persistent handle of a context (that's how you get
> context from API).
>
> Persistent<Context> context = ...
>
> context.Dispose();
> context.Clear();
>
>
> On Fri, Jun 12, 2009 at 2:57 AM, ondras<[email protected]> wrote:
> >
> > Hi,
> >
> > what is the correct way of destroying a context?
> > I presume that Context is heap-allocated, but am not sure what is the
> > proper way of destroying it (at runtime).
> >
> > Thanks a lot for answers!
> >
> > O.
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to