cscore: Add Shutdown() function

This allows ordered shutdown / destruction of sources and sinks prior to
global singleton destruction.
This commit is contained in:
Peter Johnson
2018-11-07 00:01:27 -08:00
parent 76f5d153fa
commit 193b0a222c
7 changed files with 36 additions and 2 deletions

View File

@@ -87,6 +87,8 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
}
JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) {
cs::Shutdown();
JNIEnv* env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK)
return;