Java Programming
static 변수 garbage collection
tomato13
2010. 7. 14. 09:21
http://drken.tistory.com/9
static 변수는 Garbage collection이 안될 것이다. 그런데 아래의 경우는 어떨까?
static ArrayList al = null;
{
al = new ArrayList(); // 1번의 데이터
al = new ArrayList(); // 2번의 데이터
}
=> 테스트 결과 gc가 되었다는 내용이다.