However, I'm able to create multiple instances using this function:
Local<Function> f = function_template->GetFunction();
Persistent<Object> o = Persistent<Object>::New(f-
>NewInstance());
o->SetInternalField(0, External::New(object));
context->Global()->Set(String::New("object"), o);
On Feb 23, 10:03 pm, Ondřej Žára <[email protected]> wrote:
> I believe the text mentioned speaks about FunctionTemplates. Calling
> "GetFunction()" on FunctionTemplate always yields the same function...
>
> O.
>
> 2010/2/23 Igor Sysoev <[email protected]>
>
> >http://code.google.com/apis/v8/embed.html#templatesstates that:
>
> > "However you can only have one instance of any template in any given
> > context."
>
> > In my simple tests I could create several instances of an object
> > template in one context. Does it mean that the statement above is
> > obsolete or there are still real underlying potential problems if
> > multiple instances are used ?
>
> > --
> > v8-users mailing list
> > [email protected]
> >http://groups.google.com/group/v8-users
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users