Dec 5, implement gc for locals and arrays

implement gc for local vars.

 

The test code is very similar with the test code yesterday. only add one more statement.

 

	private static void testNewRawArray() {
		int[] ia = new int[1];
		int[] ib = ia;
	}

 all object created in method should be deleted after the method return even it store to local variables twice.

 

	private static void testStoreInArray() {
		Object[] oa = new Object[2];
		oa[0] = new Object();
	}
 

你可能感兴趣的:(Arrays)