Is there a way to gracefully shut down all threads created by miniaudio when the application exits? #829
Unanswered
digitalgust
asked this question in
Q&A
Replies: 1 comment
-
Resources are cleaned up when you uninitialize the relevant objects. So a thread used by |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, I have encapsulated miniaudio api for use by the Java language. However, when other developer use the Java API, miniaudio resources are not released when the Java program exits. As a result, miniaudio threads continue to run even after the java application exits( not exit(0)), but some resources such as audio data buffers in Java have already been released. This leads to memory access errors within miniaudio threads. One solution to this problem is to pause all miniaudio threads before the Java program exits, or miniaudio can destroy all existing objects, allowing for a more graceful exit without causing memory access errors. Another approach to solve this problem is for the encapsulation layer to store all miniaudio objects and destroy any remaining objects before exiting.
Beta Was this translation helpful? Give feedback.
All reactions