http://drken.tistory.com/9
static 변수는 Garbage collection이 안될 것이다. 그런데 아래의 경우는 어떨까?
static ArrayList al = null;
{
al = new ArrayList(); // 1번의 데이터
al = new ArrayList(); // 2번의 데이터
}
=> 테스트 결과 gc가 되었다는 내용이다.
'Java Programming' 카테고리의 다른 글
How to read output from a Command execution (0) | 2010.10.04 |
---|---|
Invoking Methods by Name (0) | 2010.09.27 |
Java Compiler Generating Secret Methods (0) | 2010.07.06 |
java filecopy (0) | 2010.06.07 |
Handling memory leaks in Java programs (0) | 2010.03.29 |