With recent versions of v8 the SetWeak method has changed and the Persistent<Value>* parameter has been dropped from the destructor callback. The destructor callback function is **supposed** to Reset() the persistent or its a leak. If you don't V8 crashes and tells you this:
Check failed: Handle not reset in first callback. See comments on |v8::WeakCallbackInfo Old signature: void MyClass::DestructorCallback(Isolate* pIsolate, Persistent<Value>* value, MyClass* pObj) New signature void MyClass::DestructorCallback(const WeakCallbackInfo<MyClass>& oValue) If I call it like this: Persistent<Object> obj(isolate, objLocal); obj.SetWeak<MyClass>(pMyObject, MyClass::DestructorCallback, WeakCallbackType::kParameter); How can I pass the Persistent into my DestructorCallback function so I can Reset it?? Persistent cannot be copied. So how can I Reset() it in the callback? Any help would be great. Also the WeakCallbackType::kParameter vs WeakCallbackType::kFinalizer thing has me confuzeled too. Which is the right type to use? Thanks! -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.