aboutsummaryrefslogtreecommitdiffstats
path: root/java/jni
diff options
context:
space:
mode:
Diffstat (limited to 'java/jni')
-rw-r--r--java/jni/direct_bt/helper_dbt.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/jni/direct_bt/helper_dbt.hpp b/java/jni/direct_bt/helper_dbt.hpp
index b2f002d..40e2c60 100644
--- a/java/jni/direct_bt/helper_dbt.hpp
+++ b/java/jni/direct_bt/helper_dbt.hpp
@@ -52,6 +52,10 @@ namespace direct_bt {
};
extern DirectBTJNISettings directBTJNISettings;
+ /**
+ * Implementation for JavaAnonObj,
+ * by simply wrapping a JNIGlobalRef instance.
+ */
class JavaGlobalObj : public JavaAnonObj {
private:
JNIGlobalRef javaObjectRef;
@@ -77,7 +81,11 @@ namespace direct_bt {
return true;
}
JavaGlobalObj(jobject obj) : javaObjectRef(obj) { }
- ~JavaGlobalObj() override { }
+
+ JavaGlobalObj(const JavaGlobalObj &o) noexcept = default;
+ JavaGlobalObj(JavaGlobalObj &&o) noexcept = default;
+ JavaGlobalObj& operator=(const JavaGlobalObj &o) noexcept = default;
+ JavaGlobalObj& operator=(JavaGlobalObj &&o) noexcept = default;
std::string toString() const override {
const uint64_t ref = (uint64_t)(void*)javaObjectRef.getObject();