I know I learnt this on the SCJP syllabus, but it escapes me.
What's the term for a set of objects that refer to each other but are no longer accessible from your program (and are thus eligible for garbage collection)?
I know I learnt this on the SCJP syllabus, but it escapes me.
What's the term for a set of objects that refer to each other but are no longer accessible from your program (and are thus eligible for garbage collection)?
Your objects are unreachable (i.e. they cannot be reached from any current stack frame and can thus be considered to be garbage). In the specific case of a set of mutually-referencing objects, these can be said to have cyclic references