Skip to content
Discussion options

You must be logged in to vote

we found that such an approach might be too complex because we need to collect all pointers into an array (RefCell<Vec<Box>>) at creation and invalidate them altogether

I don't quite follow. Why is that?

My first hunch is that, instead of storing pointers, you store an identifier with JS_SetOpaque(obj, (void *)(uintptr_t)id), and then use the identifier to look up the corresponding state in a hash map. No match == request expired/completed.

Can we clone or reset the context to clean these pointers and avoid recreating prototypes at the same time?

Not at the moment, and cloning or resetting probably won't be much faster than simply recreating from scratch.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Marven11
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