Android: Use DeleteLocalRef more in WiimoteAndroid
Doesn't matter a lot, but we're supposed to do this to be nice citizens.
This commit is contained in:
1 parent
faa861f1ab
commit
5a914e5247
1 file changed
+4
@@ -66,6 +66,9 @@ WiimoteAndroid::WiimoteAndroid(int index) : Wiimote(), m_mayflash_index(index)
|
||||
jobject java_wiimote_payload = env->GetObjectArrayElement(payload_object, m_mayflash_index);
|
||||
m_java_wiimote_payload = reinterpret_cast<jbyteArray>(env->NewGlobalRef(java_wiimote_payload));
|
||||
|
||||
env->DeleteLocalRef(payload_object);
|
||||
env->DeleteLocalRef(java_wiimote_payload);
|
||||
|
||||
// Get function pointers
|
||||
m_input_func = env->GetStaticMethodID(s_adapter_class, "input", "(I)I");
|
||||
m_output_func = env->GetStaticMethodID(s_adapter_class, "output", "(I[BI)I");
|
||||
@@ -152,5 +155,6 @@ void InitAdapterClass()
|
||||
JNIEnv* env = IDCache::GetEnvForThread();
|
||||
jclass adapter_class = env->FindClass("org/dolphinemu/dolphinemu/utils/WiimoteAdapter");
|
||||
s_adapter_class = reinterpret_cast<jclass>(env->NewGlobalRef(adapter_class));
|
||||
env->DeleteLocalRef(adapter_class);
|
||||
}
|
||||
} // namespace WiimoteReal
|
||||
Reference in new issue
Block a user