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?