object aobj=new Object();..........1
object bobj=new Object();..........2
object cobj=new Object();..........3
aobj=bobj;.........................4
aobj=cobj;.........................5
cobj=null;.........................6
aobj=null;.........................7
哪行符合垃圾回收的标准?
object bobj=new Object();..........2
object cobj=new Object();..........3
aobj=bobj;.........................4
aobj=cobj;.........................5
cobj=null;.........................6
aobj=null;.........................7
哪行符合垃圾回收的标准?
5 没有任何作用
6 没有任何作用
7 cobj 会被标记可回收
当执行了6和7之后,3的Object已经没有在被“引用”符合垃圾回收的标准2始终被“引用”着,不会被回收
Order o1=new Order();
Order o2=new Order();
o1.setCustomer(c);
c.setOrder(o1);
o1=null;
o2=null;
c=null;
这道题那行符合垃圾回收标准呢????