Merged PR72 fix.
[cacao.git] / tests / gc / NativeGlobalRef.java
index 1ee8949ce44aa6dcaaa3f8c4d100c952a1b02a30..588c6ff6820f4988370cb537fac5af0e60c44c77 100644 (file)
@@ -1,6 +1,7 @@
 public class NativeGlobalRef {
        public native static void setReference(Object o);
        public native static Object getReference();
+       public native static void delReference();
 
        public static void main(String args[]) {
                Object o;
@@ -28,5 +29,8 @@ public class NativeGlobalRef {
                /* is the object still there? */
                o = getReference();
                System.out.println(o);
+
+               /* delete the reference inside the native world */
+               delReference();
        }
 }