mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Fix some links in Rust tutorial
This commit is contained in:
parent
1b9e245b4e
commit
65712e89ae
3 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ Insert this code before the `main_window.run()` call:
|
|||
{{#include main_game_logic_in_rust.rs:game_logic}}
|
||||
```
|
||||
|
||||
Notice that we take a [Weak](https://slint.dev/docs/rust/slint/struct.weak) pointer of our `main_window`. This is very
|
||||
Notice that we take a [Weak](https://slint.dev/docs/rust/slint/struct.Weak) pointer of our `main_window`. This is very
|
||||
important because capturing a copy of the `main_window` itself within the callback handler would result in a circular ownership.
|
||||
The `MainWindow` owns the callback handler, which itself owns a reference to the `MainWindow`, which must be weak
|
||||
instead of strong to avoid a memory leak.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue