Daniel Pitts wrote:
I believe that is "valid", and would only delay the collection. The
finalizer wouldn't be executed again either.
Interesting...
Still, I agree, strange question. Perhaps showing a lack of
understanding by the part of the interviewer. Big hint: Don't point
out when the interviewer makes a big mistake.
I was thinking bootstrap class loader, the run time (java.*, javax.*)
classes like String which are probably in use by the JVM all the time,
class objects themselves (if still in use), interred strings, threads in
use, the AWT Event thread, and "obvious" classes which are still
referenced by other classes (e.g., an event handler class still
referenced by a JComponent, even if the component has been hidden, or
maybe even disposed -- imagine an JComponent which is disposed but one
of it's event listeners is still being executed; not nice.)
reachable...