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

"Safer" State #5

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

pragmatrix
Copy link
Contributor

State is unsafe in respect to hot reloading new versions of the dynamic library that is being watched, but it does not have to unsafe when initialized or dropped. With this PR merged, State can be initialized by returning it from the init() function and dropped (implicitly) in the deinit() function.

Context was that I never was sure what kind of values were safe to put into State, sometimes putting another complex Rust value worked, and sometimes an Option<Box<T>> was needed to avoid crashes at initialization time.

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.

1 participant