Commit 8e430e55 authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

Java/GlobalRef: add LocalRef cast constructor

parent 9e61bda5
......@@ -125,6 +125,9 @@ public:
value = (T)env->NewGlobalRef(value);
}
GlobalRef(const LocalRef<T> &src) noexcept
:GlobalRef(src.GetEnv(), src.Get()) {}
~GlobalRef() noexcept {
GetEnv()->DeleteGlobalRef(value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment