title: Question about Garbage Collection in Java
body: <p>Suppose I have a doubly linked list. I create it as such:</p>
  
  <pre><code>MyList list = new MyList();
  </code></pre>
  
  <p>Then I add some nodes, use it and afterwards decide to throw away the old list like this:</p>
  
  <pre><code>list = new MyList();
  </code></pre>
  
  <p>Since I just created a new list, the nodes inside the old memory area are still pointing to each other. Does that mean the region with the old nodes won't get garbage collected? Do I need to make each node point to null so they're GC'd?</p>