Given the following program:
import java.io.*;
import java.util.*;
public class GCTest {
public static void main(String[] args) throws Exception {
In theory Test must not be in the scope since it is at the method level run() and the local variables should be garbage collected as you come out of the method.However you are storing the results in list, and i have read it somehere that lists are prone for storing weak references that are not garbage collected easily (depending on jvm implementation).