In your specific example, the GC will completely clear the list. This is due to the fact that they are not reachable from the graph to the root objects of the graph of the application object.
In the implementation, clear()you may notice that a value is also set for each object null, which means that any memory if any object refers to it. But in your case, you specifically said that this cannot happen.
Implementation clearfor reference:
public void clear() {
Entry<E> e = header.next;
while (e != header) {
Entry<E> next = e.next;
e.next = e.previous = null;
e.element = null;
e = next;
}
header.next = header.previous = header;
size = 0;
modCount++;
}