File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ This library implements the widely accepted solution: running physics at a fixed
3737void * physics_thread (void* arg) {
3838 TimeManager* tm = TmCreate(NULL);
3939 // ... use tm only in this thread
40+ TmDestroy(tm);
4041}
4142
4243void* 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.
You can’t perform that action at this time.
0 commit comments