[問題] 新手問題-關於GC
class test {
test go(test t)
{
t=null;
return t;
}
public static void main(String[] args)
{
test t1=new test();
test t2=new test();
test t3=t1.go(t2);
t1=null;
}
}
題目問說哪些物件是可以被garbage collecton?
我想問為什麼t3不是? 是因為它不是物件嗎!??
謝謝回答,問完會自刪@.@
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.70.97.171
推
10/27 17:15, , 1F
10/27 17:15, 1F
推
10/27 17:31, , 2F
10/27 17:31, 2F
推
10/28 10:11, , 3F
10/28 10:11, 3F