I am using the following C code in my Program:

1:      HandleScope handle_scope;
2:      Handle<ObjectTemplate> global = ObjectTemplate::New();
3:      Handle<ObjectTemplate> point_templ = ObjectTemplate::New();
4:      point_templ->SetInternalFieldCount(1);
5:      point_templ->SetAccessor(String::New("x"), Point::GetPointX,
6:      Point::SetPointX);
7:      point_templ->SetAccessor(String::New("y"), Point::GetPointY,
8:      Point::SetPointY);
9:      Point *p = new Point(3,4);
10:     Local<Object> obj = point_templ->NewInstance();
11:     obj->SetInternalField(0, External::New(p));

But when at line 10: "Local<Object> obj = point_templ-
>NewInstance();"
The Program stops with a memory access error.
Does anyone has an Idea, what's wrong in my code?

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

Reply via email to