Skip to content
Discussion options

You must be logged in to vote

It just calls V8Value_Decode and does nothing else.

Generally speaking, V8Value_Decode returns data that's valid only as long as the original V8Value remains valid and unmodified. However, there's an exception: As you can see here, V8Value_Decode constructs a new handle if the V8Value is holding a V8 object.

It works that way because the host can only interact with V8 objects via handles, whereas V8Value internally uses a different, .NET-unfriendly means of holding onto such objects.

Therefore, if you call V8Value_Decode on a V8Value that's holding a V8 object, you must remember to destroy the returned handle in addition to deleting the V8Value. To do that, call V8Entity_DestroyHandle.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AnsisMalins
Comment options

@ClearScriptLib
Comment options

Answer selected by AnsisMalins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants