Lets assume that some class is not reachable, but there are another anonymous classes generated by the class which are reachable. Could the first one be removed by the Garbage Collector?
Example:
class Outer {
public Object getInner() {
return new Object() {};
}
}
...
Outer outer = new Outer();
Object inner = outer.getInner();
// Could the "outer" instance be removed here considering that "inner" is using below?