Commit 889a2fc
committed
Fix bad custom animation example
The custom animation example suggests that a stack-allocated
AnimationImplementation variable can be used, but this is incorrect.
The variable is not copied and so must remain valid while the
animation runs.
For brevity, I have used a static qualifier to give the variable
global lifespan without making it an explicit global variable.
I have also added a note about the lifetime of the
AnimationImplementation variable.1 parent 97a39c6 commit 889a2fc
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| |||
0 commit comments