a few finalizer testcases, old thread implementation uses now VMThread, no mor contex...
[cacao.git] / tests / fintest3a.java
diff --git a/tests/fintest3a.java b/tests/fintest3a.java
new file mode 100644 (file)
index 0000000..40b56bb
--- /dev/null
@@ -0,0 +1,27 @@
+public class fintest3a {
+       public int num;
+       
+       public fintest3a (int n) { num = n; }
+
+       public void finalize () {
+               System.out.print ("finalized ");
+               System.out.print (num);
+               System.out.println (". object");
+               }
+
+       public static void main (String[] s) {
+               int i;
+               fintest3a f=null;
+
+               for (i=0; i<100; i++) {
+                       System.out.print (i);
+                       System.out.println (". Objekt wird angelegt");
+                       f = new fintest3a(i);
+                       }
+
+       
+               }
+               
+       }
+
+