Yes, just like that :) > Will making a Local object still affect the original Persistent object when I call SetInternalField()? Yeah, they point at the same [v8] object. It's just a way of keeping the object alive (like an extra reference in a ref-counted pointer), or when you make it weak, keep tabs on when it's time to delete it :)
On Tuesday, 4 September 2018 15:37:12 UTC+1, Mike Moening wrote: > > Do you mean something like this? > > > > Persistent<Object> obj; > > obj.Reset(pIsolate, blah->NewInstance()); > > > > Handle<Object> objLocal = obj.Get(pIsolate); > > > > objLocal->SetInternalField(0, External::New(pIsolate, xxxx)); > > objLocal->SetInternalField(1, External::New(pIsolate, yyyy)); > > > > obj.SetWeak<MyClass>(myPointer, MyClass::DestructorCallback); > > > > Will making a Local object still affect the original Persistent object > when I call SetInternalField()? > > -- -- 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.
