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

Add a function for users to keep pointers alive #123

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

jacob-hughes
Copy link
Collaborator

This is useful for advanced users, who may allow references to GC objects to escape from their Gc smart pointers. In such cases, one must be careful to ensure that a finalizer is not run early because of compiler optimisations (e.g. scalar replacement). This commit provides a unified way to do this using the same mechanism as Gc::drop.

This is useful for advanced users, who may allow references to GC
objects to escape from their Gc<T> smart pointers. In such cases, one
must be careful to ensure that a finalizer is not run early because of
compiler optimisations (e.g. scalar replacement). This commit provides a
unified way to do this using the same mechanism as Gc::drop.
@ltratt
Copy link
Member

ltratt commented Sep 9, 2024

Good idea!

@ltratt ltratt added this pull request to the merge queue Sep 9, 2024
Merged via the queue into softdevteam:master with commit f07e460 Sep 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants