Skip to content

Commit ee5383d

Browse files
authored
Update README.md
added destroy function to thread examples
1 parent 4d88739 commit ee5383d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ This library implements the widely accepted solution: running physics at a fixed
3737
void* physics_thread(void* arg) {
3838
TimeManager* tm = TmCreate(NULL);
3939
// ... use tm only in this thread
40+
TmDestroy(tm);
4041
}
4142

4243
void* ai_thread(void* arg) {
4344
TimeManager* tm = TmCreate(NULL);
4445
// ... use tm only in this thread
46+
TmDestroy(tm);
4547
}
4648

4749
// Also good: Single-threaded game loop
@@ -52,6 +54,7 @@ int main() {
5254
FrameTimingData frame = TmBeginFrame(tm);
5355
// All timing happens on main thread
5456
}
57+
TmDestroy(tm);
5558
}
5659
```
5760
## Building
@@ -276,4 +279,4 @@ Licensed under the MIT License. See LICENSE for more information.
276279
277280
## Contributing
278281
279-
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
282+
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

0 commit comments

Comments
 (0)