Hi,
This should fix a bug Christian reported by cleaning up LocalRefs after
they have been used.
2005-11-25 Mark Wielaard <[EMAIL PROTECTED]>
Fixes bug #24981
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkSelection.c
(clipboard_targets_received): DeleteLocalRef of NewStringUTF.
(clipboard_text_received): Likewise.
(clipboard_uris_received): Likewise.
Christian, together with the patch that I committed today for this file
this should now compile warning free and actually work, even on 64bit
machines. Could you check?
Thanks,
Mark
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkSelection.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkSelection.c,v
retrieving revision 1.2
diff -u -r1.2 gnu_java_awt_peer_gtk_GtkSelection.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkSelection.c 3 Sep 2005 23:43:12 -0000 1.2
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkSelection.c 25 Nov 2005 20:16:38 -0000
@@ -130,6 +130,7 @@
break;
(*env)->SetObjectArrayElement (env, strings, i++,
string);
+ (*env)->DeleteLocalRef (env, string);
}
}
}
@@ -201,6 +202,10 @@
textAvailableID,
string);
(*env)->DeleteGlobalRef (env, selection_obj);
+
+ if (string != NULL)
+ (*env)->DeleteLocalRef (env, string);
+
}
JNIEXPORT void JNICALL
@@ -324,6 +329,7 @@
if (string == NULL)
break;
(*env)->SetObjectArrayElement (env, strings, i, string);
+ (*env)->DeleteLocalRef (env, string);
}
}
g_strfreev (uris);
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches