-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Extend memory management chapter #1458
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The memory management chapter already covers many foot guns when it comes to memory management with gtk-rs, but I think we could start with an even simpler example:
Fails with:
The
move
is already covered, but we should also mention that signal handlers areFn
notFnMut
.This means they cannot mutate state.
@sdroege says they are
Fn
because:After explaining the requirement of
static'
lifetimes and inner mutability, we can move on to shared state withRc
and GObjects.The text was updated successfully, but these errors were encountered: