Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support finalization forwarding #643

Closed
RomainMuller opened this issue Jul 23, 2019 · 3 comments
Closed

Support finalization forwarding #643

RomainMuller opened this issue Jul 23, 2019 · 3 comments
Labels
closed-for-staleness effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. module/runtime Issues affecting the `jsii-runtime` p1

Comments

@RomainMuller
Copy link
Contributor

The current JSII Runtimes don't typically forward finalization/de-allocation events to the JSII kernel, causing any object that was passed across the process boundary to be held in the node process' heap forever after.

At least in certain languages, it should be possible to forward de-allocation events through in order to allow the node process to perform GC.

@eladb
Copy link
Contributor

eladb commented Jul 23, 2019

It's not that simple because there could be references on both sides...

@RomainMuller RomainMuller added module/runtime Issues affecting the `jsii-runtime` feature-request A feature should be added or improved. labels Oct 4, 2019
@RomainMuller
Copy link
Contributor Author

Finalization forwarding is really just about notifying the jsii kernel that the native side of the application no longer holds a reference on a given object, so that the kernel itself can release it's hold there, allowing for the object to be collected (if it has also become unreachable in Javascript land).

The "complexity" comes from the fact that the kernel might re-send that same object to native and in this case it has to do so properly (I think ideally re-using the same Object ID, ...). This is where some of the complexity come, but is still fairly straight forward.

@RomainMuller RomainMuller self-assigned this Oct 8, 2019
@fulghum fulghum added the p1 label Oct 8, 2019
@RomainMuller RomainMuller added jsii/🚀/hubble effort/large Large work item – several weeks of effort labels Oct 11, 2019
@RomainMuller RomainMuller removed their assignment Jun 24, 2021
@github-actions
Copy link
Contributor

This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. module/runtime Issues affecting the `jsii-runtime` p1
Projects
None yet
Development

No branches or pull requests

3 participants