diff options
author | Sven Gothel <[email protected]> | 2020-05-03 03:40:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-03 03:40:41 +0200 |
commit | 00e5cfb31c5f8ad083525c07dd0b2ab019ac87b6 (patch) | |
tree | 524b5c5a87def039d7a6b19fd148d9aed1387a6d /java/jni | |
parent | 68eec28811bee0aab06b34d3e1d3a0d079ad639a (diff) |
DBTManager::close(): Clear adapterInfos (avoiding re-entry failure); Java deleteImpl(): Calls close().
DBTManager::close(): Clear adapterInfos (avoiding re-entry failure), make it functional.
Java deleteImpl(): Calls close(), avoiding same on JVM shutdown.
Diffstat (limited to 'java/jni')
-rw-r--r-- | java/jni/direct_bt/DBTManager.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/java/jni/direct_bt/DBTManager.cxx b/java/jni/direct_bt/DBTManager.cxx index 21f01f8f..1f24cbb1 100644 --- a/java/jni/direct_bt/DBTManager.cxx +++ b/java/jni/direct_bt/DBTManager.cxx @@ -55,6 +55,7 @@ void Java_direct_1bt_tinyb_DBTManager_deleteImpl(JNIEnv *env, jobject obj) try { DBTManager *manager = getInstance<DBTManager>(env, obj); // special: static singleton manager->setJavaObject(nullptr); + manager->close(); // delete manager; (void) manager; } catch(...) { |