Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

investigate the trick with enter local scope and not to copy strings #23

Open
peter-leonov opened this issue May 12, 2010 · 2 comments
Open

Comments

@peter-leonov
Copy link
Owner

If it is possible to protect every string is used in the request from garbage collecting till the request is gone, we can forget about copying all the strings bytes, just use the JS_Malloc'ed memory.

Also the data exchange between the JS engine and the engine X will be greatly simplified.

Check this.

@peter-leonov
Copy link
Owner Author

Oh, and the GC-rooting of the request wrapper becomes unnecessary! :)

@peter-leonov
Copy link
Owner Author

JS_EnterLocalRootScope() and JS_LeaveLocalRootScope() work with a stack. So an overlap may occur leading to an alive objects collecting.

Also, ATM, we can't get a local root token to emulate a named root scope and enter/leave it many times, then collect. Will try to emulate this manually with arrays or something kinda like.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant