Java/GlobalRef: add LocalRef cast constructor
This commit is contained in:
parent
9e61bda592
commit
8e430e55af
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue