Hi,

I guess these questions would be better place in some sort of chat 
platform, as I might have more, but here they go, never the less.

The documentation for Object::Wrap/Unwrap seems quite thin, are there any 
good code examples on how to use this correctly?

I looks like this is just a nicer api for embedders than 
Set/GEtInternalField, but it's not obvious how to use the type tags?

Separate question around finalizers.
Currently I track c++ object lifetime with:
if (class_spec->destructor)
{
    v8::Global<v8::Object> global_handle(isolate, obj);
    global_handle.SetWeak(native_ptr, class_spec->destructor, v8::
WeakCallbackType::kParameter);
}

and the destructor is type aware, casts the void* behind native_ptr to the 
correct type and deletes it.

Do these fire when the isolate is shut down?
Doesn't look like it.
How do I get the isolate to fire all finalizers on termination to make sure 
all C++ objects are cleaned up?

My project creates quite a lot of short lived isolates which it might 
terminate, and I want to make sure they (and the object behind them) are 
cleaned up correctly,.

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.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-users/af455812-a01d-41b0-aacb-e839c09df0d7n%40googlegroups.com.

Reply via email to